From 7dddfcfd7892944172413a55ff7e6e354ef4dccf Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 22 Sep 2022 18:53:08 +0200 Subject: [PATCH] Set scripts to new run_directory norm --- firefox-load.sh | 3 ++- firefox-save.sh | 3 ++- install.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firefox-load.sh b/firefox-load.sh index 73f3488..d1f72ad 100755 --- a/firefox-load.sh +++ b/firefox-load.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # The purpose of this script is to install a Firefox profile from a save location. -source "$(dirname "$0")/variables.conf" +run_directory=$(dirname $(readlink -f "$0")) +source "$run_directory/variables.conf" # Remove current profile rm -r $firefox_data_path/$profile_name diff --git a/firefox-save.sh b/firefox-save.sh index 2182001..87fdca9 100755 --- a/firefox-save.sh +++ b/firefox-save.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # The purpose of this script is to zip a Firefox profile and stash it to a save location. -source "$(dirname "$0")/variables.conf" +run_directory=$(dirname $(readlink -f "$0")) +source "$run_directory/variables.conf" # Remove old archive rm $save_path/$file_name diff --git a/install.sh b/install.sh index 6c2fd39..2d1c55b 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -run_directory=$(dirname "$0") +run_directory=$(dirname $(readlink -f "$0")) user=$(whoami) if [ -f $run_directory/.disabled ]; then