File tree 3 files changed +18
-13
lines changed
3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 2
2
# how to run:
3
3
# disperse_python4geosciences_file.sh [filename]
4
4
5
- file=$1
6
- echo copyng $file
5
+ users1=$1
6
+ users2=$2
7
+ file=$3
7
8
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##*/ } ;
11
13
echo copied $file for $id
12
14
done
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
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
11
5
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
Original file line number Diff line number Diff line change @@ -31,3 +31,7 @@ python3 make_student_dict_entries.py $groster1
31
31
python3 make_student_dict_entries.py $groster2
32
32
33
33
# 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]
You can’t perform that action at this time.
0 commit comments