aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2021-01-27 14:43:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2021-01-27 14:43:51 -0300
commitd7515f6130879773875d7b3fd0612db86139d0df (patch)
tree40d558aac02e0cefc14c60e81ccc4c6414dc524b
parente704891a1caf50e744bdbf61e09f205130bfc87f (diff)
downloadscripts-d7515f6130879773875d7b3fd0612db86139d0df.tar.gz
scripts-d7515f6130879773875d7b3fd0612db86139d0df.tar.bz2
Fix: scuttle: torify
-rwxr-xr-xscuttle6
1 files changed, 3 insertions, 3 deletions
diff --git a/scuttle b/scuttle
index 9de746c..22dd3c9 100755
--- a/scuttle
+++ b/scuttle
@@ -8,7 +8,7 @@ function urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
-
+
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
@@ -17,7 +17,7 @@ function urlencode() {
*) printf '%%%02X' "'$c" ;;
esac
done
-
+
LC_COLLATE=$old_lc_collate
}
@@ -49,7 +49,7 @@ CALL="$CALL&tags=$TAGS"
# Description
if [ -z "$DESC" ]; then
- DESC="`curl -s $URL | grep -i "<title>" | sed -e 's|<title>\(.*\)</title>|\1|' 2> /dev/null`"
+ DESC="`torify curl -s $URL | grep -i "<title>" | sed -e 's|<title>\(.*\)</title>|\1|' 2> /dev/null`"
echo "Fetched description: $DESC"
fi