Last active
January 29, 2020 14:48
-
-
Save legalsylvain/8535605007d029e127e4fe51ae1b885a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Odoo Commands | |
run_odoo_12 () { | |
cmd="sudo su odoo12 -c './env/bin/python3 ./src/odoo/odoo-bin -c ./odoo.cfg $@'"; | |
eval "$cmd"; | |
} | |
run_odoo_8 () { | |
cmd="sudo su odoo8 -c './env/bin/python2 ./src/odoo/openerp-server -c ./odoo.cfg $@'"; | |
eval "$cmd"; | |
} | |
psql_command (){ | |
cmd="sudo su postgres -c \"psql -c '$@'\""; | |
echo "Executing ..." $cmd; | |
eval "$cmd"; | |
} | |
### Git Commands | |
gcommit () { | |
cmd="git add . && git commit -m $@"; | |
eval "$cmd"; | |
} | |
gfixup () { | |
cmd="git add . && git commit --fixup HEAD"; | |
eval "$cmd"; | |
} | |
gfixup-push () { | |
gfixup; | |
branch=$(eval "git rev-parse --abbrev-ref HEAD"); | |
cmd="git push legalsylvain $branch"; | |
eval "$cmd"; | |
} | |
glog () { | |
cmd="git log --oneline"; | |
eval "$cmd"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment