From 71938a3ef5751a2654458efd9e08ade72805adf1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 26 Aug 2023 11:18:09 -0300 Subject: Updates tor-browser --- share/hoarder/tor-browser/unix/linux/install | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'share/hoarder') diff --git a/share/hoarder/tor-browser/unix/linux/install b/share/hoarder/tor-browser/unix/linux/install index f3a9a18..00e7f67 100755 --- a/share/hoarder/tor-browser/unix/linux/install +++ b/share/hoarder/tor-browser/unix/linux/install @@ -11,6 +11,7 @@ LIB="$2" # Additional parameters DIST="https://dist.torproject.org/torbrowser/" WORK="`mktemp -d`" || exit 1 +ARCH="`uname -m`" # Determine the application name if echo $BASENAME | grep -q 'tor-browser-alpha'; then @@ -19,6 +20,15 @@ else APP="tor-browser" fi +# Determine architecture +if [ "$ARCH" == "i386" ]; then + ARCH="linux32" +elif [ "$ARCH" == "i686" ]; then + ARCH="linux32" +elif [ "$ARCH" == "x86_64" ]; then + ARCH="linux64" +fi + # Include basic functions . $LIB/trashman/functions || exit 1 @@ -42,7 +52,7 @@ fi # Build the URL and filename strings URL="${DIST}/${VERSION}/" -FILE="tor-browser-linux64-${VERSION}_ALL.tar.xz" +FILE="tor-browser-${ARCH}-${VERSION}_ALL.tar.xz" # Download wget "$URL/$FILE" -O $WORK/$FILE || exit 1 @@ -57,17 +67,20 @@ rm -rf $WORK/.gnupg || exi tar xvf $WORK/$FILE -C $WORK || exit 1 # Install -mkdir -p $HOME/.local/share || exit 1 -cd $HOME/.local/share || exit 1 -rm -rf $APP || exit 1 -mv $WORK/tor-browser $APP || exit 1 -rm -rf $WORK || exit 1 +mkdir -p $HOME/.local/share || exit 1 +cd $HOME/.local/share || exit 1 +rm -rf $APP || exit 1 +mv $WORK/tor-browser $APP/$ARCH || exit 1 +rm -rf $WORK || exit 1 # Create symlink to scripts -mkdir -p $HOME/.local/bin || exit 1 -cd $HOME/.local/bin || exit 1 -ln -sf $HOME/.local/share/$APP/Browser/start-tor-browser $APP || exit 1 +mkdir -p $HOME/.local/bin || exit 1 +cd $HOME/.local/bin || exit 1 +ln -sf $HOME/.local/share/$APP/${ARCH}/Browser/start-tor-browser $APP-${ARCH} || exit 1 + +# Remove old symlink to the Tor Browser script +rm -f $HOME/.local/bin/$APP # Done -trashman_installed_at $HOME/.local/share/$APP -trashman_run_with $HOME/.local/bin/$APP +trashman_installed_at $HOME/.local/share/$APP/$ARCH +trashman_run_with $HOME/.local/bin/$APP-$ARCH -- cgit v1.2.3