add over boilerplate deployment script
This commit is contained in:
parent
20393b74ff
commit
9565fdcee6
3 changed files with 45 additions and 0 deletions
0
.over_inhibit_deployment
Normal file
0
.over_inhibit_deployment
Normal file
14
deploy-template.sh
Executable file
14
deploy-template.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#! /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" >> .gitignore
|
||||||
|
else
|
||||||
|
echo '!! Missing argument (program name).'
|
||||||
|
fi
|
31
template.py
Normal file
31
template.py
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#! /usr/bin/env python3
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
# library imports
|
||||||
|
import over
|
||||||
|
|
||||||
|
# local imports
|
||||||
|
#import version
|
||||||
|
|
||||||
|
# --------------------------------------------------
|
||||||
|
# Exceptions
|
||||||
|
|
||||||
|
class ConfigurationError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# --------------------------------------------------
|
||||||
|
# Functions
|
||||||
|
|
||||||
|
# --------------------------------------------------
|
||||||
|
# Classes
|
||||||
|
|
||||||
|
# --------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main = over.core.app.Main('PROGRAM_NAME', version.str, 'AO-JSL')
|
||||||
|
main.add_option('option', 'type', 'default', 'Description.', short_name='s')
|
||||||
|
main.add_help('Description', ['What it does.'])
|
||||||
|
main.enable_help('h')
|
||||||
|
main.parse()
|
||||||
|
|
||||||
|
...
|
Loading…
Add table
Add a link
Reference in a new issue