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

New exam unpacker

parent e8586763
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
exam=Sda1/SoSe2016
##############################
rm -rf ~/newUsers.txt
for zip in $( ls *.zip); do
fbname=$(basename "$zip" .zip)
for fbname in $( ls ); do
destuser=~/ownCloud/Fh/KlausurBewertung/$fbname
if [ -d "$destuser" ]
......@@ -14,12 +17,16 @@ for zip in $( ls *.zip); do
echo "$destuser does not exist"
echo $fbname >> ~/newUsers.txt
fi
destdir=$destuser/Sda1/Ws2015
# destdir=$destuser/Se1/SoSe2015
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 $fbname.zip to $destdir
mv $fbname.zip $destdir
# mv $fbname.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