aboutsummaryrefslogtreecommitdiff
path: root/subprojects/freeamo/src/main_functions
diff options
context:
space:
mode:
authordavid <public@beloved.name>2018-07-27 15:25:06 +0200
committerdavid <public@beloved.name>2018-07-27 15:25:06 +0200
commit70315f1f07fe669f4b78c5d73192234a90f55f47 (patch)
tree95caac72e182e943ca84063ee92ac9cf72c98763 /subprojects/freeamo/src/main_functions
parenta45433d2cf90620fd2e00adcb498ae170469a78b (diff)
FreeAMO: Evaluate and from the localization function
Diffstat (limited to 'subprojects/freeamo/src/main_functions')
-rw-r--r--subprojects/freeamo/src/main_functions44
1 files changed, 32 insertions, 12 deletions
diff --git a/subprojects/freeamo/src/main_functions b/subprojects/freeamo/src/main_functions
index 88de297..789b348 100644
--- a/subprojects/freeamo/src/main_functions
+++ b/subprojects/freeamo/src/main_functions
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
function latest_debranded_trisquel_version {
-
+
# All debranded programs starts with "i" so all of them are in Trisquels "/i/" directory
wget -qO- "http://archive.trisquel.info/trisquel/pool/main/i/$debranded_package/?C=N;O=D" | sed "s|\"|\\n|g; s|-|\\n|g" | grep "$debranded_package"_ | head -n 1 | sed "s|"$debranded_package"_||"
@@ -70,14 +70,6 @@ echo "####################"
# Use the first avalible if English is not avaliable
tmp=$(jq -r ".results[$entry].$locale_description[]" "$file" | head -n 1) || [[ $? == 141 ]] # jq causes superfluous 141
-
-# David will work on this later
-# if [ "$tmp" == "" ]; then
-#
-# # Some entries doesn't provide any `description` field but only a `summary` field.
-# tmp=$(jq ".results[$entry].summary[]" "$file" | head -n 1 | sed "s|-|_|");
-#
-#fi
if [ "$tmp__en_US" != "null" ]; then
@@ -92,7 +84,15 @@ echo "####################"
elif [ "$locale_description" == "description" ]; then
description="$tmp__en_US";
+
+ elif [ "$locale_description" == "homepage" ]; then
+ homepage="$tmp__en_US";
+
+ elif [ "$locale_description" == "support_url" ]; then
+
+ support_url="$tmp__en_US";
+
fi
@@ -109,6 +109,14 @@ echo "####################"
elif [ "$locale_description" == "description" ]; then
description="$tmp__en_GB";
+
+ elif [ "$locale_description" == "homepage" ]; then
+
+ homepage="$tmp__en_GB";
+
+ elif [ "$locale_description" == "support_url" ]; then
+
+ support_url="$tmp__en_GB";
fi
@@ -125,14 +133,26 @@ echo "####################"
elif [ "$locale_description" == "description" ]; then
description="$tmp";
+
+ elif [ "$locale_description" == "homepage" ]; then
+
+ homepage="$tmp";
+
+ elif [ "$locale_description" == "support_url" ]; then
+
+ support_url="$tmp";
fi
fi
-
-echo "$name
-.results[$entry].$locale_description[] $file"
+ # Use summary if description is not provided
+ if [ "$description" == "" ]; then
+
+ description="$summary"
+
+ fi
+
}
# End locale code