added renew feature
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Sun, 13 Sep 2009 17:16:44 +0000 (19:16 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Sun, 13 Sep 2009 17:16:44 +0000 (19:16 +0200)
vasp_tools/outcar2moldyn

index 197f28c..6950453 100755 (executable)
@@ -4,7 +4,15 @@ for i in OUTCAR*; do
        app=`echo $i | awk -F. '{ print $2 }'`
        [ ! -z $app ] && app=".$app"
 
-rm -rf video$app
+if [ "$1" = "renew" ]; then
+       rm -rf video$app
+fi
+
+if [ -d video$app ]; then
+       echo "skipping $app ... (use $0 renew to force rebuild)"
+       continue
+fi
+
 mkdir -p video$app
 
 sicnt=`grep 'ions per' $i | awk '{ print $5 }'`