aboutsummaryrefslogtreecommitdiff
path: root/stow-services
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-07-30 23:43:32 +0200
committerNeodarZ <neodarz@neodarz.net>2017-07-30 23:43:32 +0200
commitf88eac462e3121e63363e877f763afbfb9d6dda8 (patch)
tree5dd3f9a9230bc79a16501c35089dac654e2d31eb /stow-services
parent2d92c02da3d760a0ded8e7612ef003a66e21f554 (diff)
downloaddotfiles_ascii-f88eac462e3121e63363e877f763afbfb9d6dda8.tar.xz
dotfiles_ascii-f88eac462e3121e63363e877f763afbfb9d6dda8.zip
Add stow service
Diffstat (limited to 'stow-services')
-rwxr-xr-xstow-services11
1 files changed, 11 insertions, 0 deletions
diff --git a/stow-services b/stow-services
new file mode 100755
index 0000000..23f1ed9
--- /dev/null
+++ b/stow-services
@@ -0,0 +1,11 @@
+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
+ else
+ echo "Warning ! You must be in the dotfile folder to execute this !"
+ echo "Sorry the file $1 not found !"
+ fi
+else
+ echo "Syntax: services/<name of the service"
+fi