Skip to content

Commit bf60038

Browse files
committed
all steps can be run now
1 parent dba2d4d commit bf60038

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

scripts/disperse_python4geosciences_file.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# how to run:
33
# disperse_python4geosciences_file.sh [filename]
44

5-
file=$1
6-
echo copyng $file
5+
users1=$1
6+
users2=$2
7+
file=$3
78

8-
for id in `cat /root/pgs2017_g /root/pgs2017_ug` ; do
9-
cp -rf $file /d2/home/$id/notebooks/python4geosciences/materials ;
10-
chown $id:pythonspring2017 /d2/home/$id/notebooks/python4geosciences/materials/${file##*/} ;
9+
for id in `cat $users1 $users2` ; do
10+
cp -rf $file /home/$id/python4geosciences/materials ;
11+
# removes path up to the file itself
12+
chown $id:$id /home/$id/python4geosciences/materials/${file##*/} ;
1113
echo copied $file for $id
1214
done
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/bin/bash
22

3-
for id in `cat /root/pgs2017_g /root/pgs2017_ug` ; do
4-
mkdir /d2/home/$id/notebooks ;
5-
cp -rf python4geosciences /d2/home/$id/notebooks ;
6-
rm -rf /d2/home/$id/notebooks/python4geosciences/.git
7-
chown -R $id:pythonspring2017 /d2/home/$id/notebooks ;
8-
done
9-
10-
3+
users1=$1
4+
users2=$2
115

6+
for id in `cat $users1 $users2` ; do
7+
cp -rf ../../python4geosciences /home/$id ;
8+
rm -rf /home/$id/python4geosciences/.git
9+
chown -R $id:$id /home/$id ;
10+
done

scripts/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ python3 make_student_dict_entries.py $groster1
3131
python3 make_student_dict_entries.py $groster2
3232

3333
# disperse class materials to students
34+
sudo ./disperse_python4geosciences_materials.sh users_undergrads.txt users_grads.txt
35+
36+
# Later, disperse another file
37+
# sudo ./disperse_python4geosciences_file.sh users_undergrads.txt users_grads.txt [filename]

0 commit comments

Comments
 (0)