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

Update

parent 3d66adca
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
exam=Sda1/SoSe2016 exam=Se1/SoSe2016
#exam=Sda1/SoSe2016
############################## ##############################
rm -rf ~/newUsers.txt rm -rf ~/newUsers.txt
for fbname in $( ls ); do for zip in $( ls *.zip); do
destuser=~/ownCloud/Fh/KlausurBewertung/$fbname userId=${zip%.zip}
destuser=~/ownCloud/Fh/KlausurBewertung/$userId
if [ -d "$destuser" ] if [ -d "$destuser" ]
then then
echo "$destuser exists" echo "$destuser exists"
else else
echo "$destuser does not exist" echo "$destuser does not exist"
echo $fbname >> ~/newUsers.txt echo $userId >> ~/newUsers.txt
fi fi
destdir=$destuser/$exam destdir=$destuser/$exam
mkdir -p Unpack;cd Unpack # mkdir -p Unpack;cd Unpack
unzip ../$fbname 1> /dev/null 2>& 1 || echo $fbname is not a .zip archive # unzip ../$fbname 1> /dev/null 2>& 1 || echo $fbname is not a .zip archive
mkdir -p $destdir mkdir -p $destdir
echo moving $fbname.zip to $destdir # echo moving $zip to $destdir
# mv $fbname.zip $destdir mv $zip $destdir
# mv Unpack/$fbname/* $destdir # mv Unpack/$fbname/* $destdir
done done
......
...@@ -9,7 +9,7 @@ rm -f ~/results.log ...@@ -9,7 +9,7 @@ rm -f ~/results.log
for zip in $( ls *.zip); do for zip in $( ls *.zip); do
fbname=$(basename "$zip" .zip) fbname=$(basename "$zip" .zip)
echo $fbname echo $fbname
pushd Unpack mkdir Unpack;pushd Unpack
unzip ../$fbname.zip unzip ../$fbname.zip
rm -rf RemoteSystemsTempFiles rm -rf RemoteSystemsTempFiles
nodeCount=`ls|wc -l` nodeCount=`ls|wc -l`
...@@ -20,12 +20,11 @@ for zip in $( ls *.zip); do ...@@ -20,12 +20,11 @@ for zip in $( ls *.zip); do
mv * project mv * project
if [ -f project/pom.xml ]; then if [ -f project/pom.xml ]; then
echo "found pom.xml" echo "found pom.xml"
cd project tar zxf ~/goiksolution.tgz
mvn clean eclipse:clean; rm -rf .settings/ A1.log mv project/src/main/java/de/hdm_stuttgart/sw1 GoikSolution/src/main/java/de/hdm_stuttgart
rm -rf pom.xml src/test/java cd GoikSolution;
tar zxf ~/solutionTest.tgz mvn compile
mvn -Dmaven.test.skip=true package reachedPoints=`mvn exec:java -Dexec.mainClass="de.hdm_stuttgart.eval.ShowReachedPoints"|grep Test_Helper`
reachedPoints=`java -jar target/sw1klausur-0.9.jar|grep myGoikKlausurMarkeri| sed -e s/myGoikKlausurMarkeri://`
echo "$fbname $reachedPoints" >> ~/results.log echo "$fbname $reachedPoints" >> ~/results.log
else else
echo "$fbname : No pom.xml found in project" >> ~/results.log echo "$fbname : No pom.xml found in project" >> ~/results.log
...@@ -33,9 +32,8 @@ for zip in $( ls *.zip); do ...@@ -33,9 +32,8 @@ for zip in $( ls *.zip); do
else else
echo "$fbname : Found more than one directory component" >> ~/results.log echo "$fbname : Found more than one directory component" >> ~/results.log
fi fi
popd popd
rm -rf Unpack/* rm -rf Unpack
done 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