over/deploy-template.sh
2015-06-11 11:51:31 +02:00

14 lines
417 B
Bash
Executable file

#! /bin/zsh
# encoding: utf-8
if [[ -a ".over_inhibit_deployment" ]]; then
echo '!! deployment inhibited by lock file (hint: run this from the target directory, not the over directory)'
elif [[ -n "$1" ]]; then
OVER_DIR="$(readlink -f "$(dirname "$0")")"
ln -s "$OVER_DIR"
cp "$OVER_DIR/template.py" "$1"
chmod +x "$1"
echo "over\n__pycache__" >> .gitignore
else
echo '!! Missing argument (program name).'
fi