aboutsummaryrefslogtreecommitdiff
path: root/stow-services
blob: 23f1ed941e774b6c9416f2075e13aad04e25d47c (plain)
1
2
3
4
5
6
7
8
9
10
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