diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rwxr-xr-x | tor-browser.sh | 24 |
3 files changed, 17 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = tor-browser pkgdesc = Tor Browser Bundle: Anonymous browsing using firefox and tor (language-agnostic PKGBUILD) pkgver = 7.0.2 - pkgrel = 3 + pkgrel = 4 url = https://www.torproject.org/projects/torbrowser.html install = tor-browser.install arch = i686 @@ -38,7 +38,7 @@ pkgbase = tor-browser md5sums = 914bc94601657ac143f21acd8ed75747 md5sums = d7aa692701859b7ab6cd55f48e44e5e7 md5sums = 494afbfa60fb4ce21840244cc3f7208c - md5sums = 688fb4382e55ed0c6108a3d9df2ac8ef + md5sums = ac6ee6d201ae0fa14250fbaf13959130 source_i686 = https://dist.torproject.org/torbrowser/7.0.2/tor-browser-linux32-7.0.2_en-US.tar.xz source_i686 = https://dist.torproject.org/torbrowser/7.0.2/tor-browser-linux32-7.0.2_en-US.tar.xz.asc md5sums_i686 = SKIP @@ -12,7 +12,7 @@ pkgname='tor-browser' pkgver='7.0.2' -pkgrel='3' +pkgrel='4' pkgdesc='Tor Browser Bundle: Anonymous browsing using firefox and tor (language-agnostic PKGBUILD)' url='https://www.torproject.org/projects/torbrowser.html' arch=('i686' 'x86_64') @@ -75,9 +75,9 @@ source=("${pkgname}.desktop" "${pkgname}.sh") md5sums=('914bc94601657ac143f21acd8ed75747' - 'd7aa692701859b7ab6cd55f48e44e5e7' - '494afbfa60fb4ce21840244cc3f7208c' - '688fb4382e55ed0c6108a3d9df2ac8ef') + 'd7aa692701859b7ab6cd55f48e44e5e7' + '494afbfa60fb4ce21840244cc3f7208c' + 'ac6ee6d201ae0fa14250fbaf13959130') md5sums_i686=('SKIP' 'SKIP') md5sums_x86_64=('SKIP' diff --git a/tor-browser.sh b/tor-browser.sh index e0b1b3c00147..16eddc48ad9c 100755 --- a/tor-browser.sh +++ b/tor-browser.sh @@ -34,7 +34,7 @@ _TB_HOME_DIR_=~/".${_TB_PKGNAME_}" _TB_APP_DIR_="${_TB_HOME_DIR_}/app" _TB_VER_FILE_="${_TB_HOME_DIR_}/VERSION" _TB_LOG_FILE_="${_TB_HOME_DIR_}/LOG" -_TB_UPDATE_=0 +_TB_REFRESH_=0 # syntax: _notify_ "${TITLE}" "${MESSAGE}" @@ -79,23 +79,21 @@ _refresh_local_() { _aur_update_() { local DO_UPDATE=0 - local AUR_URL="https://aur.archlinux.org/cgit/aur.git/snapshot/${_TB_PKGNAME_}.tar.gz" if [[ "$(id -u)" == '0' ]]; then echo 'It is not a good idea to do this as root. Abort.' 1>&2 exit 1 fi - if ! curl --output /dev/null --silent --head --fail "${AUR_URL}"; then - echo 'Unable to retrieve the PKGBUILD. Abort.' - exit 1 - fi - local TMP_PKGBUILD="$(mktemp -d)" cd "${TMP_PKGBUILD}" - curl --silent "${AUR_URL}" | tar xz + if ! { curl --silent --fail "https://aur.archlinux.org/cgit/aur.git/snapshot/${_TB_PKGNAME_}.tar.gz" | tar xz ;} 2>/dev/null; then + echo 'Unable to retrieve the PKGBUILD. Abort.' + rm -rf "${TMP_PKGBUILD}" + exit 1 + fi cd "${TMP_PKGBUILD}/${_TB_PKGNAME_}" @@ -146,7 +144,7 @@ for arg; do case "${arg}" in -h|--help) _usage_; exit 0 ;; -u|--update) _aur_update_; exit 0 ;; - -f|--refresh) _TB_UPDATE_=1 ;; + -f|--refresh) _TB_REFRESH_=1 ;; --dir=*) _TB_HOME_DIR_="${arg#*=}" ;; *) args+=("$arg") ;; esac @@ -160,13 +158,13 @@ cd "${_TB_HOME_DIR_}" [[ ! -f "${_TB_VER_FILE_}" ]] && echo 0 > "${_TB_VER_FILE_}" # get the installed version -while read line +while read _TB_VER_LINE_ do - TB_INSTALLED_VERSION="${line}" + _TB_INSTALLED_VERSION_="${_TB_VER_LINE_}" done < "${_TB_VER_FILE_}" # start update if old or no tor-browser is installed -if [[ "${TB_INSTALLED_VERSION}" == "${_TB_VERSION_}" ]] && [[ ${_TB_UPDATE_} -eq 0 ]]; then +if [[ "${_TB_INSTALLED_VERSION_}" == "${_TB_VERSION_}" ]] && [[ ${_TB_REFRESH_} -eq 0 ]]; then # clear log > "${_TB_LOG_FILE_}" else @@ -175,5 +173,5 @@ else fi # start tor-browser -cd "${_TB_APP_DIR_}/Browser" && ./start-tor-browser "${args[@]}" +"${_TB_APP_DIR_}/Browser/start-tor-browser" "${args[@]}" |