aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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