aboutsummaryrefslogtreecommitdiff
path: root/subprojects/freeamo/freeamo
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/freeamo/freeamo')
-rwxr-xr-xsubprojects/freeamo/freeamo77
1 files changed, 57 insertions, 20 deletions
diff --git a/subprojects/freeamo/freeamo b/subprojects/freeamo/freeamo
index dec2d5c..bd1df0e 100755
--- a/subprojects/freeamo/freeamo
+++ b/subprojects/freeamo/freeamo
@@ -15,20 +15,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-source freeamo.conf
-
scriptsrc=$(readlink -f -- "${BASH_SOURCE[0]}")
run_path=$(dirname "${scriptsrc}" || echo .)
filename=$(basename "$0");
+source "$run_path/src/main_functions"
+source "$run_path/freeamo.conf"
+
+
+#source "$run_path/src/err"
+
output_file_1="$run_path/build/index-search-pages.txt";
output_file_2="$run_path/build/index-search-pages--free-licenses.txt"
-# source "$run_path/build/err"
-
# Evaluate debug mode
if [ "$1" == "--debug" ] || [ "$2" == "--debug" ]; then
-
+
debug=true
debug_arg="--debug";
@@ -55,14 +57,31 @@ if [[ $exit == true ]]; then exit 1; fi
case "$1" in
- ""|--debug)
+ ""|--debug|--normal-mode)
- $0 --disclaimer "$debug_arg"
- $0 --remove-build "$debug_arg"
- $0 --search-pages "$debug_arg"
- $0 --get-licenses "$debug_arg"
- $0 --make-directory.fsf.org-wiki "$debug_arg"
+ freeamo_command="$0 --conf-note $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+
+ freeamo_command="$0 --remove-build $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+ freeamo_command="$0 --conf-copy $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+
+ freeamo_command="$0 --search-pages $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+
+ freeamo_command="$0 --get-licenses $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+
+ if [ ! "$1" == "--normal-mode" ]; then
+
+ freeamo_command="$0 --make-directory.fsf.org-wiki $debug_arg :"
+ echo "$freeamo_command"; $freeamo_command
+
+ fi
+
+
;;
-help)
@@ -70,10 +89,13 @@ case "$1" in
[ "$1" = "" ] && echo "Usage: $filename [--option] [--debug]
OPTIONS
- $0 --disclaimer
+f.org-wiki (they are used by Free Software Directory developers)
+ $0 --conf-note
Display which icecat version the add-on will be compatible with.
$0 --remove-build
Remove the build directory if it exists.
+ $0 --conf-copy
+ Copy the conf file to the build directory.
$0 --search-pages
Downloads the most popular WebExtensions from https://addons.mozilla.org/en-US/firefox/search/...
$0 --get-licenses
@@ -100,23 +122,35 @@ Disabled options due to limited development time
;;
- --disclaimer)
-
- echo "$notes"
+ --conf-note)
+ echo "$notes"
+
;;
-
+
--remove-build)
rm -fr "$run_path/build"
;;
+
+ --conf-copy)
+
+ mkdir -p "$run_path/build/"
+ echo -e "# [This file is a copy used as a receipt to declare the settings that were used to generate the files.]\\n" > "$run_path/build/freeamo.conf"
+ cat "$run_path/freeamo.conf" >> "$run_path/build/freeamo.conf"
+ sed -i "/^appversion=/ s/$/ # $appversion at the time/" "$run_path/build/freeamo.conf"
+
+ ;;
--search-pages)
# This option is named after named after https://addons.mozilla.org/en-US/firefox/search/
- $0 --search-pages--download "$debug_arg"
- $0 --search-pages--filter "$debug_arg"
+ freeamo_command="$0 --search-pages--download $debug_arg :"
+ echo " ↳$freeamo_command"; $freeamo_command
+
+ freeamo_command="$0 --search-pages--filter $debug_arg :"
+ echo " ↳$freeamo_command"; $freeamo_command
;;
@@ -138,8 +172,11 @@ Disabled options due to limited development time
--get-licenses)
- $0 --get-licenses--download "$debug_arg"
- $0 --get-licenses--filter "$debug_arg"
+ freeamo_command="$0 --get-licenses--download $debug_arg :"
+ echo " ↳$freeamo_command"; $freeamo_command
+
+ freeamo_command="$0 --get-licenses--filter $debug_arg :"
+ echo " ↳$freeamo_command"; $freeamo_command
;;