Skip to content
Snippets Groups Projects
Commit e3e58d19 authored by Goik Martin's avatar Goik Martin
Browse files

Configurable destination dir

parent 28fda45b
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
exam=Se1/Ws2016
exam=Se1/Ws2018
#exam=Sda1/Ws2016
#exam=Sda1/SoSe2016
cloudbase=~/C/Hdm/Fh/KlausurBewertung
##############################
......@@ -11,26 +13,20 @@ rm -rf ~/newUsers.txt
for zip in $( ls *.zip); do
userId=${zip%.zip}
destuser=~/C/HdM/Fh/KlausurBewertung/$userId
destuser=$cloudbase/$userId
if [ -d "$destuser" ]
then
echo "$destuser exists"
else
echo "$destuser does not exist"
echo "$destuser will be created"
echo $userId >> ~/newUsers.txt
fi
destdir=$destuser/$exam
# mkdir -p Unpack;cd Unpack
# unzip ../$fbname 1> /dev/null 2>& 1 || echo $fbname is not a .zip archive
mkdir -p $destdir
echo moving $zip to $destdir
mv $zip $destdir
# mv Unpack/$fbname/* $destdir
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment