Files
Estia-MCNP/csubmit
2018-09-09 01:55:53 +02:00

23 lines
732 B
Bash
Executable File

#!/bin/bash
# make sure the tag for the generated files is correct
# by checking that all changes have been commited to GIT
# (this does not include newly created files)
if ( ! git diff-index --quiet --cached HEAD -- ) || ( ! git diff-files --quiet )
then
echo "Uncommitted changes in the GIT repository:"
git status --untracked-files=no
read -p "Add changes and commit, amend last commit or exit [c/a/e]: " res
case $res in
[Cc]* ) git commit -a;;
[Aa]* ) git commit -a --amend;;
* ) exit;;
esac
fi
sbatch cbatch.tsh "`/usr/bin/git describe --tags --long`" $1
# waiting for batch job to start and send all output directly to terminal
sleep 2
tail -qf tmp/stdout.log tmp/stderr.log