aboutsummaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
Diffstat (limited to 'settings')
-rwxr-xr-xsettings/disable_settings.sh10
-rwxr-xr-xsettings/enable_settings.sh12
-rw-r--r--settings/toggle-settings.sh19
3 files changed, 19 insertions, 22 deletions
diff --git a/settings/disable_settings.sh b/settings/disable_settings.sh
deleted file mode 100755
index b3167d4..0000000
--- a/settings/disable_settings.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-# Moves the settings from the main program folder to the settings folder, disabling it
-
-SETTINGS_FOLDER=$(realpath $(dirname $0));
-PROGRAM_FOLDER=$SETTINGS_FOLDER/../;
-
-mv $PROGRAM_FOLDER/defaults/pref/local-settings.js $SETTINGS_FOLDER/defaults/pref/local-settings.js;
-mv $PROGRAM_FOLDER/distribution/policies.json $SETTINGS_FOLDER/distribution/policies.json;
-mv $PROGRAM_FOLDER/librewolf.cfg $SETTINGS_FOLDER/librewolf.cfg;
-
diff --git a/settings/enable_settings.sh b/settings/enable_settings.sh
deleted file mode 100755
index 23533b6..0000000
--- a/settings/enable_settings.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-# Copies settings from the settings folder to the main program folder, enabling them
-
-SETTINGS_FOLDER=$(realpath $(dirname $0));
-PROGRAM_FOLDER=$SETTINGS_FOLDER/../;
-
-mkdir -p $PROGRAM_FOLDER/defaults/pref/;
-mkdir -p $PROGRAM_FOLDER/distribution/;
-
-cp $SETTINGS_FOLDER/defaults/pref/local-settings.js $PROGRAM_FOLDER/defaults/pref/local-settings.js;
-cp $SETTINGS_FOLDER/distribution/policies.json $PROGRAM_FOLDER/distribution/policies.json;
-cp $SETTINGS_FOLDER/librewolf.cfg $PROGRAM_FOLDER/librewolf.cfg;
diff --git a/settings/toggle-settings.sh b/settings/toggle-settings.sh
new file mode 100644
index 0000000..8a7b30a
--- /dev/null
+++ b/settings/toggle-settings.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+SCRIPT_FOLDER=$(realpath $(dirname $0));
+
+# Enable settings ------------------------------------------------------------------------------------------
+if [ "$1" = "--enable" ]; then
+ mv $SCRIPT_FOLDER/"[DISABLED] local-settings.js" $SCRIPT_FOLDER/local-settings.js;
+ mv $SCRIPT_FOLDER/"[DISABLED] policies.json" $SCRIPT_FOLDER/policies.json;
+ mv $SCRIPT_FOLDER/"[DISABLED] librewolf.cfg" $SCRIPT_FOLDER/librewolf.cfg;
+fi
+
+# Disable settings ------------------------------------------------------------------------------------------
+if [ "$1" = "--disable" ]; then
+ mv $SCRIPT_FOLDER/local-settings.js $SCRIPT_FOLDER/"[DISABLED] local-settings.js";
+ mv $SCRIPT_FOLDER/policies.json $SCRIPT_FOLDER/"[DISABLED] policies.json";
+ mv $SCRIPT_FOLDER/librewolf.cfg $SCRIPT_FOLDER/"[DISABLED] librewolf.cfg" ;
+fi
+
+
bgstack15