Skip to content

Commit

Permalink
Reformat shell scripts with shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lubo committed Apr 28, 2024
1 parent e7c92df commit 9f25a75
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
34 changes: 17 additions & 17 deletions bin/curl-chrome
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Combination of `Copy as cURL` from Chrome and curl-impersonate.

exec curl \
-H 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'DNT: 1' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-User: ?1' \
-H 'Sec-Fetch-Dest: document' \
-H 'Accept-Encoding: deflate, gzip, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
--ciphers TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA \
--compressed \
--tlsv1.2 \
"$@"
-H 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'DNT: 1' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-User: ?1' \
-H 'Sec-Fetch-Dest: document' \
-H 'Accept-Encoding: deflate, gzip, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
--ciphers TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA \
--compressed \
--tlsv1.2 \
"$@"
6 changes: 3 additions & 3 deletions bin/sync-bookmarks
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ commit_changes() {

git add "${BOOKMARK_DATABASE_PATH}"

with-ssh-agent git commit -m "Update database" > /dev/null
with-ssh-agent git commit -m "Update database" >/dev/null

echo "Bookmark database updated. Don't forget to push after reviewing" \
"the changes."
Expand All @@ -46,10 +46,10 @@ export_bookmarks() {

git checkout -fq master
__bookmarkmgr export-collection "${BOOKMARK_RAINDROP_COLLECTION}" \
> "${BOOKMARK_DATABASE_PATH}"
>"${BOOKMARK_DATABASE_PATH}"
commit_changes

cd - > /dev/null
cd - >/dev/null
}

main() {
Expand Down
6 changes: 3 additions & 3 deletions bin/sync-music-library
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ commit_changes() {

git add "${MUSIC_LIBRARY_DATABASE_PATH}"

with-ssh-agent git commit -m "Update database" > /dev/null
with-ssh-agent git commit -m "Update database" >/dev/null

echo "Library database updated. Don't forget to push after reviewing" \
"the changes."
Expand All @@ -37,10 +37,10 @@ main() {
cd "$(dirname "${MUSIC_LIBRARY_DATABASE_PATH}")"

git checkout -fq master
__ytm export-library > "${MUSIC_LIBRARY_DATABASE_PATH}"
__ytm export-library >"${MUSIC_LIBRARY_DATABASE_PATH}"
commit_changes

cd - > /dev/null
cd - >/dev/null
elif [ -n "${MUSIC_LIBRARY_DATABASE_PATH}" ]; then
echo "${MUSIC_LIBRARY_DATABASE_PATH}: Not a file" >&2
else
Expand Down

0 comments on commit 9f25a75

Please sign in to comment.