From 2b93a250c606cae0a37bb358c2e8b5d57d9dd11a Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 17 Mar 2022 15:07:16 +0100 Subject: [PATCH] Add the ability to disable install --- .gitignore | 1 + install.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4603f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.disabled diff --git a/install.sh b/install.sh index 8625948..366bd86 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,14 @@ #!/usr/bin/env bash +run_directory=$(dirname "$0") + +if [ -f $run_directory/.disabled ]; then + echo "Installation is disabled. Exiting..." + exit 0 +fi + echo "Copying Systemd units to user's directory..." -cp $(dirname "$0")/pulseaudio-dlna.service $HOME/.config/systemd/user/ +cp $run_directory/pulseaudio-dlna.service $HOME/.config/systemd/user/ echo "Reloading Systemd's user runtime..." systemctl --user daemon-reload