aboutsummaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authorIan Kelling <iank@fsf.org>2018-07-25 21:01:13 -0400
committerIan Kelling <iank@fsf.org>2018-07-25 21:01:13 -0400
commitb6ca88eb4793b3442ba6b1fe350169a7e0668945 (patch)
tree6b2c9b02ac80dd206d247e902b7cc413b1050668 /subprojects
parent5891b34cae04c533456fc547eba4e21f00ca913e (diff)
progress toward making things work with err:
remove : to fix command not found error. remove ((line++)) reference to unset variable error add missing line initialization fix style, prefer 'x"x' to "x\"x" for readability turn off pv when debug is set, it's messing up stack trace output
Diffstat (limited to 'subprojects')
-rwxr-xr-xsubprojects/freeamo/freeamo21
-rw-r--r--subprojects/freeamo/src/get-add-ons4
-rw-r--r--subprojects/freeamo/src/get-licenses3
-rw-r--r--subprojects/freeamo/src/main_functions6
4 files changed, 16 insertions, 18 deletions
diff --git a/subprojects/freeamo/freeamo b/subprojects/freeamo/freeamo
index 2c036e9..abd8250 100755
--- a/subprojects/freeamo/freeamo
+++ b/subprojects/freeamo/freeamo
@@ -23,7 +23,7 @@ source "$run_path/src/main_functions"
source "$run_path/freeamo.conf"
-#source "$run_path/src/err"
+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"
@@ -36,8 +36,8 @@ if [ "$1" == "--debug" ] || [ "$2" == "--debug" ]; then
else
- debug=false;
- unset debug_arg;
+ debug=false
+ unset debug_arg
fi
@@ -55,31 +55,32 @@ if [ ! -f /usr/bin/wget ]; then echo "/usr/bin/wget not found!"; exit=true; fi
if [[ $exit == true ]]; then exit 1; fi
+
case "$1" in
""|--debug|--normal-mode)
- freeamo_command="$0 --conf-note $debug_arg :"
+ freeamo_command="$0 --conf-note $debug_arg"
echo "$freeamo_command"; $freeamo_command
- freeamo_command="$0 --remove-build $debug_arg :"
+ freeamo_command="$0 --remove-build $debug_arg"
echo "$freeamo_command"; $freeamo_command
- freeamo_command="$0 --conf-copy $debug_arg :"
+ freeamo_command="$0 --conf-copy $debug_arg"
echo "$freeamo_command"; $freeamo_command
- freeamo_command="$0 --search-pages $debug_arg :"
+ freeamo_command="$0 --search-pages $debug_arg"
echo "$freeamo_command"; $freeamo_command
- freeamo_command="$0 --get-licenses $debug_arg :"
+ freeamo_command="$0 --get-licenses $debug_arg"
echo "$freeamo_command"; $freeamo_command
- freeamo_command="$0 --get-add-ons $debug_arg :"
+ freeamo_command="$0 --get-add-ons $debug_arg"
echo "$freeamo_command"; $freeamo_command
if [ ! "$1" == "--normal-mode" ]; then
- freeamo_command="$0 --make-directory.fsf.org-wiki $debug_arg :"
+ freeamo_command="$0 --make-directory.fsf.org-wiki $debug_arg"
echo "$freeamo_command"; $freeamo_command
fi
diff --git a/subprojects/freeamo/src/get-add-ons b/subprojects/freeamo/src/get-add-ons
index 6038bd6..f7307d5 100644
--- a/subprojects/freeamo/src/get-add-ons
+++ b/subprojects/freeamo/src/get-add-ons
@@ -36,8 +36,6 @@ function get-add-ons--download {
while IFS= read -r table; do
- ((line++))
-
file=$(echo "$table" | awk '{print $1}');
entry=$(echo "$table" | awk '{print $2}');
@@ -76,8 +74,6 @@ function get-add-ons--filter {
while IFS= read -r table; do
- ((line++))
-
file=$(echo "$table" | awk '{print $1}');
entry=$(echo "$table" | awk '{print $2}');
diff --git a/subprojects/freeamo/src/get-licenses b/subprojects/freeamo/src/get-licenses
index 4298962..610d614 100644
--- a/subprojects/freeamo/src/get-licenses
+++ b/subprojects/freeamo/src/get-licenses
@@ -40,7 +40,8 @@ function get-licenses--download {
echo "Download $pv__size current_versions files that contain license information."
-
+
+ line=0
while IFS= read -r table; do
((++line))
diff --git a/subprojects/freeamo/src/main_functions b/subprojects/freeamo/src/main_functions
index 3eb673e..453485a 100644
--- a/subprojects/freeamo/src/main_functions
+++ b/subprojects/freeamo/src/main_functions
@@ -65,8 +65,8 @@ function locale_description {
echo "####################"
- tmp__enUS=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enUS | sed "s|^\"||; s|\"$||;" )
- tmp__enGB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enGB | sed "s|^\"||; s|\"$||;" )
+ tmp__enUS=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enUS | sed 's|^"||; s|"$||;' )
+ tmp__enGB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enGB | sed 's|^"||; s|"$||;' )
tmp=$(jq ".results[$entry].$locale_description[]" "$file" | head -n 1 | sed "s|^\"||; s|\"$||;"); # Use the first avalible if English is not avaliable
@@ -212,7 +212,7 @@ function essential_addon {
function pv__progress {
- if [ ! "$pv__discard" = true ]; then
+ if [ ! "$pv__discard" = true ] && ! $debug; then
(pv --progress --line-mode --size "$pv__size" --timer) > /dev/null