Commit 56b5ee5e authored by okhin's avatar okhin 🚴

Merge branch 'master' into 'master'

Minor improvements on bin/dev

Closes #192 and #193

See merge request !199
parents 90de91bb 6ee07d6f
Pipeline #1022 passed with stages
in 9 minutes and 36 seconds
...@@ -11,24 +11,27 @@ REPOROOT="$( readlink -m "${BASH_SOURCE[0]}"/../..)" ...@@ -11,24 +11,27 @@ REPOROOT="$( readlink -m "${BASH_SOURCE[0]}"/../..)"
ALIASROOT=$REPOROOT"/.memopol.alias" ALIASROOT=$REPOROOT"/.memopol.alias"
echo $ALIASROOT echo $ALIASROOT
echo "Create a dedicated alias file in $ALIASROOT" echo "Create a dedicated alias file in $ALIASROOT"
echo "alias memopol-code=\"cd $REPOROOT && source $REPOROOT/memopol_env/bin/activate && DJANGO_DEBUG=True\"" > $ALIASROOT echo "alias memopol-code=\"cd $REPOROOT && source $REPOROOT/memopol_env/bin/activate && export DJANGO_DEBUG=True\"" > $ALIASROOT
echo "alias memopol-launch=\"memopol-code && memopol runserver\"" >> $ALIASROOT echo "alias memopol-launch=\"memopol-code && memopol runserver\"" >> $ALIASROOT
echo "alias memopol-update-all=\"memopol-code && bin/update-all\"" >> $ALIASROOT echo "alias memopol-update-all=\"memopol-code && bin/update_all\"" >> $ALIASROOT
echo "alias memopol-refresh-scores=\"memopol-code && memopol refresh_scores\"" >> $ALIASROOT echo "alias memopol-refresh-scores=\"memopol-code && memopol refresh_scores\"" >> $ALIASROOT
if [ $SHELL = "/bin/bash" ] case $SHELL in
then */bash)
echo "Bash detected" echo "Bash detected"
echo "Update $HOME/.bashrc file" echo "Update $HOME/.bashrc file"
RCSHELL="$HOME/.bashrc" RCSHELL="$HOME/.bashrc"
elif [ $SHELL = "/bin/zsh" ] ;;
then */zsh)
echo "Zsh detected" echo "Zsh detected"
echo "Update $HOME/.zshrc file" echo "Update $HOME/.zshrc file"
RCSHELL="$HOME/.zshrc" RCSHELL="$HOME/.zshrc"
else ;;
echo "SHELL don't supported. Try using BASH or ZSH, or manually." *)
fi echo "SHELL not supported. Try using BASH or ZSH, or set alias manually."
RCSHELL="/dev/null"
;;
esac
echo "source $ALIASROOT" >> $RCSHELL echo "source $ALIASROOT" >> $RCSHELL
source $ALIASROOT source $ALIASROOT
...@@ -37,5 +40,5 @@ source $ALIASROOT ...@@ -37,5 +40,5 @@ source $ALIASROOT
echo -e "You can use the following aliases :\n" echo -e "You can use the following aliases :\n"
echo -e "\t memopol-code : Go into the repository and activate the virtualenv" echo -e "\t memopol-code : Go into the repository and activate the virtualenv"
echo -e "\t memopol-launch : Run the development server" echo -e "\t memopol-launch : Run the development server"
echo -e "\t memopoll-update-all : Get all the production data" echo -e "\t memopol-update-all : Get all the production data"
echo -e "\t memopol-refresh-scores : Refresh all scores" echo -e "\t memopol-refresh-scores : Refresh all scores"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment