generated from small-tech/watson
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
preview-in-appcenter
executable file
·27 lines (17 loc) · 1.05 KB
/
preview-in-appcenter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
language="en"
if [[ ! -z "${1}" ]]; then
language="${1}"
fi
echo -e "\n • Preview in AppCenter using locale ${language}"
echo -e "\n • Temporarily uncommenting icon in metadata so it displays in preview."
sed -i 's/<!-- <icon type="stock">org.small_tech.comet<\/icon> -->/<icon type="stock">org.small_tech.comet<\/icon>/' data/comet.appdata.xml.in
echo -e "\n • Building and installing app and AppCenter metadata."
# Ensure an up-to-date build exists and is installed.
task/install
echo -e "\n • Previewing in AppCenter. When done, exit AppCenter (do not press Ctrl+C here as we need to perform clean-up)."
# Preview in the elementary OS AppCenter using the requested (or default) locale.
LANGUAGE="${language}" io.elementary.appcenter --load-local build/org.small_tech.comet.appdata.xml
echo -e "\n • Re-commenting out icon in metadata so Flatpak doesn’t complain."
sed -i 's/<icon type="stock">org.small_tech.comet<\/icon>/<!-- <icon type="stock">org.small_tech.comet<\/icon> -->/' data/comet.appdata.xml.in
echo -e "\nDone!"