summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSwift Geek2013-08-31 08:24:55 +0000
committerThomas Dziedzic2013-08-31 08:24:55 +0000
commit0476f58bf725a7276bab960d006d26434948ea08 (patch)
tree48f98f15e247331c9762ae0ef392df708db92c24
parent7a850236bf7b30eefe5cb4c60d481c12cd2ac86a (diff)
downloadaur-0476f58bf725a7276bab960d006d26434948ea08.tar.gz
Import from pkgbuild.com service
-rw-r--r--PKGBUILD10
1 files changed, 6 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d2456f74c2fd..b8b826bd90d7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,6 @@
# Contributor && Maintarner: Swift Geek <swiftgeek ɐt gmail døt com>
# TODO: ADD parser for config in /etc/makepkg.d/. Use that config instead of auto-detection! tidier code
# TODO: FIND AND FIX EDGE CASES (EMPTY VARS!) *SPANK*
-# TODO: ALWAYS DELETE SRCDIR contents
pkgname=firefox-nightly-i18n
pkgver=26.0a1
@@ -13,21 +12,22 @@ license=('MPL')
depends=('firefox-nightly')
countdown() {
- # TODO: FFS CHECK FOR MAIN PID
local i
for ((i=$1; i>=1; i--)); do
+ [[ ! -e /proc/$$ ]] && exit
echo -ne "\rPress [i] to start interactive config in $i second(s) or any key to skip "
sleep 1
done
}
ls_lang () {
-( ftp -in ftp.mozilla.org <<EOF
+{ ftp -in ftp.mozilla.org <<EOF
user anonymous secrets
cd /pub/firefox/nightly/latest-mozilla-central-l10n/linux-$CARCH/xpi/
ls
EOF
-) | grep ftp.*ftp.*firefox.*langpack.xpi$ | awk -F\. '{print $(NF-2)}' | tr '\n' ' '
+[ "$?" != 0 ] && error "FTP connection failed" && exit 1
+} | grep ftp.*ftp.*firefox.*langpack.xpi$ | awk -F\. '{print $(NF-2)}' | tr '\n' ' '
}
prepare() {
@@ -72,7 +72,9 @@ prepare() {
# Display dialog
selected_lang_list=$(dialog --clear --backtitle "$pkgname" --checklist 'Choose langpacks to include' 0 0 0 "${menu_lang_list[@]}" 2>&1 >/dev/tty)
msg2 "${selected_lang_list[*]} "
+ [ -z "${selected_lang_list[*]}" ] && error "Nothing was selected" && exit 1
else
+ [ -z "${sys_lang_list[*]}" ] && exit 1
selected_lang_list=${sys_lang_list[*]}
msg2 "Assuming auto-detect was good"
fi