summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rwxr-xr-xsh/cgm2
-rwxr-xr-xsh/curlqb4
-rwxr-xr-xsh/rate2
-rwxr-xr-xsh/upd12
-rwxr-xr-xsh/wtr2
5 files changed, 11 insertions, 11 deletions
diff --git a/sh/cgm b/sh/cgm
index 039a007..6342393 100755
--- a/sh/cgm
+++ b/sh/cgm
@@ -27,7 +27,7 @@ mkdir "$dir"
for month in $(curl -L "$url" \
| awk -F'"' '/href="[0-9]{4,4}(-[[:alnum:]]+)?\.txt(\.gz)?">\[/{print $2}'); do
{
- curl -s -L -o "$dir/$month" "$url/$month"
+ curl -sS -L -o "$dir/$month" "$url/$month"
echo "Fetched $month..."
if [ "${month##*.}" = gz ]; then
gunzip "$dir/$month"
diff --git a/sh/curlqb b/sh/curlqb
index d2851cd..fca3026 100755
--- a/sh/curlqb
+++ b/sh/curlqb
@@ -4,7 +4,7 @@
# if do this also need change .py.1 to .py else qbt will not accept
# also if a.py and a_1.py, qbt will not accept the latter, maybe need to change some .py codes inside
# now, I choose to let three files to be overwrited, those are "with categories" .py files that overwrite without categories .py files, which is what I want so I don't use --no-clobber
-curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' '
+curl -sS 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' '
/user-content-plugins-for-private-sites/ {exit}
/\.py/ {
url=$2
@@ -14,7 +14,7 @@ curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-pl
if($0 !~ /❗|✖/)
print url
}
-' | xargs curl -s -Z -L --remote-name-all --create-dirs --output-dir "$1" --
+' | xargs curl -sS -Z -L --remote-name-all --create-dirs --output-dir "$1" --
# an alternative awk command:
#awk -F'"' '
diff --git a/sh/rate b/sh/rate
index 3b4d404..464df26 100755
--- a/sh/rate
+++ b/sh/rate
@@ -4,4 +4,4 @@
# click url/ result to see more return data descriptions
# last 24 hours volume weighted average price
# XXMRZUSD seems same as XMR/USD, but don't know how to query XMR/USD via jq
-curl -s "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1]
+curl -sS "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1]
diff --git a/sh/upd b/sh/upd
index eeecdf6..f8a315d 100755
--- a/sh/upd
+++ b/sh/upd
@@ -258,13 +258,13 @@ monthly_misc () {
fi
# https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)
- curl -s -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' &
+ curl -sS -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' &
for qbt_wireguard_ip in 10.0.0.3 10.0.0.4; do
- curl -s https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -s -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" &
+ curl -sS https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -sS -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" &
# another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'`
- curl -s "$qbt_wireguard_ip:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do
+ curl -sS "$qbt_wireguard_ip:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do
# need POST to delete torrents. -d default POST, so no need `-X POST`
- curl -s -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete"
+ curl -sS -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete"
done &
done
wait
@@ -278,14 +278,14 @@ monthly_misc () {
rsync -vPu studio:~/downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso
# only check checksum and gpg signature on insp is sufficient for me, else too much work
- if curl -s -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then
+ if curl -sS -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then
gpg --verify /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig || die 'Arch iso gpg signature check failed'
else
die 'Arch iso gpg signature download failed'
fi
# need to cd to iso file dir to checksum
cd /run/media/xyz/Ventoy || exit
- curl -s https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match'
+ curl -sS https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match'
# if stay at /run/media/xyz/Ventoy, will cause it be busy and can't be umount, which will cause `ventoy -u` fail
# need to be after `wait`, because checksum need to be at ventoy dir
cd || exit
diff --git a/sh/wtr b/sh/wtr
index 5b385d6..14598b7 100755
--- a/sh/wtr
+++ b/sh/wtr
@@ -1,7 +1,7 @@
#!/bin/sh
# https://github.com/open-meteo/open-meteo
-curl -s -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do
+curl -sS -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do
# https://open-meteo.com/en/docs
case "$code" in
0) code='clear sky';;