aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2018-12-05 23:53:19 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2018-12-05 23:53:19 +0100
commit52cd3bb8d9c0f1f63cf30e2a474141e3385069d3 (patch)
tree01fc50418f4343fab67df0ef5e3bab47ad542d8d
parent921de6d0023f09db986dbed1c25c4e27196d3fdb (diff)
downloadLuxcena-Neo-52cd3bb8d9c0f1f63cf30e2a474141e3385069d3.tar.gz
Luxcena-Neo-52cd3bb8d9c0f1f63cf30e2a474141e3385069d3.zip
:construction: Add path to branch-checks
-rwxr-xr-xbin/luxcena-neo-cli.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/luxcena-neo-cli.sh b/bin/luxcena-neo-cli.sh
index a3c46bf..d744869 100755
--- a/bin/luxcena-neo-cli.sh
+++ b/bin/luxcena-neo-cli.sh
@@ -151,14 +151,13 @@ elif [ "$action" == "log" ]; then
elif [ "$action" == "version" ] || [ "$action" == "v" ]; then
printf "╭─────────────────────╮\n"
printf "│ Version: Unknown │\n"
- printf "│ branch : $(git branch | grep \* | cut -d ' ' -f2) │\n"
+ printf "│ branch : $(git branch -C /home/lux-neo/src | grep \* | cut -d ' ' -f2) │\n"
printf "╰─────────────────────╯\n\n"
elif [ "$action" == "selectBranch" ]; then
- printf "Current $(git branch | grep \* | cut -d ' ' -f2)Branch \n"
- runuser -l 'lux-neo' -c "git -C ~/src checkout $2"
- printf "\e[91mYou should now run \e[90m'sudo lux-neo update'\e[91m!\n"
-
+ printf "Current $(git -C /home/lux-neo/src branch | grep \* | cut -d ' ' -f2)Branch \n"
+ runuser -l 'lux-neo' -c "git -C ~/src checkout $2" || printf "\e[91mYou should now run \e[90m'sudo lux-neo update'\e[91m!\n"
+
else
usage
fi