Merge settings management

This commit is contained in:
BeatLink 2019-07-14 13:17:40 -05:00
parent bdaf8f6d22
commit aafbd45b66
3 changed files with 19 additions and 22 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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