diff options
author | neodarz <neodarz@neodarz.net> | 2017-08-24 17:21:44 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2017-08-24 17:21:44 +0200 |
commit | 0d28f0d5775a3d1b0ed00016b4d7c75e1fe29b10 (patch) | |
tree | d0bc7ca9af26f2d81a1e01d2ab4ec61db4b14787 | |
parent | 910ba3bc6617461b88dc5a3742dd7b8af9be0ea3 (diff) | |
parent | e988fb4e973d6d08d4b41d364fa9bbfbcad512ad (diff) | |
download | dotfiles_ascii-0d28f0d5775a3d1b0ed00016b4d7c75e1fe29b10.tar.xz dotfiles_ascii-0d28f0d5775a3d1b0ed00016b4d7c75e1fe29b10.zip |
Merge branch 'master' of ssh://neodarz.net:19977/home/git/pub_repo/neodarz/conf/dotfiles_ascii
-rwxr-xr-x | stow-services | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/stow-services b/stow-services index 23f1ed9..1b28c0c 100755 --- a/stow-services +++ b/stow-services @@ -1,7 +1,13 @@ serviceName=$(echo $1 | cut -d'/' -f'2') if [[ $1 =~ "/" && $serviceName != "" ]]; then if [ -f "$1" ]; then - sudo ln -s $(readlink -f $1) /usr/lib/systemd/user/$serviceName + if [[ $(echo $1 | cut -d'/' -f1) == "services" ]]; then + sudo ln -s $(readlink -f $1) /usr/lib/systemd/user/$serviceName + elif [[ $(echo $1 | cut -d'/' -f1) == "services-root" ]]; then + sudo ln -s $(readlink -f $1) /usr/lib/systemd/system/$serviceName + else + echo "You can only install service from services and services-root folder !" + fi else echo "Warning ! You must be in the dotfile folder to execute this !" echo "Sorry the file $1 not found !" |