about summary refs log tree commit diff
path: root/pkgs/applications/emulators
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2022-12-03 02:52:34 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2022-12-17 23:32:43 +0100
commit04a1c0d7add4ebe7a1092b7d22968d26fc0de379 (patch)
tree3863e49a398e914cfe5597d7f7fb61b263768eb3 /pkgs/applications/emulators
parentafeb3385fcc78d8fb133ec2bcabcb53a4facb227 (diff)
treewide: fix quoting of GITHUB_TOKEN in curl
Diffstat (limited to 'pkgs/applications/emulators')
-rwxr-xr-xpkgs/applications/emulators/citra/update.sh4
-rwxr-xr-xpkgs/applications/emulators/yuzu/update.sh8
2 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/applications/emulators/citra/update.sh b/pkgs/applications/emulators/citra/update.sh
index eec36818fede2..6b68e3327a2e2 100755
--- a/pkgs/applications/emulators/citra/update.sh
+++ b/pkgs/applications/emulators/citra/update.sh
@@ -27,7 +27,7 @@ updateNightly() {
     OLD_NIGHTLY_VERSION="$(getLocalVersion "citra-nightly")"
     OLD_NIGHTLY_HASH="$(getLocalHash "citra-nightly")"
 
-    NEW_NIGHTLY_VERSION="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
+    NEW_NIGHTLY_VERSION="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
         "https://api.github.com/repos/citra-emu/citra-nightly/releases?per_page=1" | jq -r '.[0].name' | cut -d"-" -f2 | cut -d" " -f2)"
 
     if [[ "${OLD_NIGHTLY_VERSION}" = "${NEW_NIGHTLY_VERSION}" ]]; then
@@ -52,7 +52,7 @@ updateCanary() {
     OLD_CANARY_VERSION="$(getLocalVersion "citra-canary")"
     OLD_CANARY_HASH="$(getLocalHash "citra-canary")"
 
-    NEW_CANARY_VERSION="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
+    NEW_CANARY_VERSION="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
         "https://api.github.com/repos/citra-emu/citra-canary/releases?per_page=1" | jq -r '.[0].name' | cut -d"-" -f2 | cut -d" " -f1)"
 
     if [[ "${OLD_CANARY_VERSION}" = "${NEW_CANARY_VERSION}" ]]; then
diff --git a/pkgs/applications/emulators/yuzu/update.sh b/pkgs/applications/emulators/yuzu/update.sh
index 074d5b155fbfd..bfabd6a206949 100755
--- a/pkgs/applications/emulators/yuzu/update.sh
+++ b/pkgs/applications/emulators/yuzu/update.sh
@@ -21,10 +21,10 @@ updateBranch() {
     oldHash="$(nix eval --raw -f "./default.nix" "$attribute".src.drvAttrs.outputHash)"
 
     if [[ "$branch" = "mainline" ]]; then
-        newVersion="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/yuzu-emu/yuzu-mainline/releases?per_page=1" \
+        newVersion="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/yuzu-emu/yuzu-mainline/releases?per_page=1" \
             | jq -r '.[0].name' | cut -d" " -f2)"
     elif [[ "$branch" = "early-access" ]]; then
-        newVersion="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/pineappleEA/pineapple-src/releases?per_page=2" \
+        newVersion="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/pineappleEA/pineapple-src/releases?per_page=2" \
             | jq -r '.[].tag_name' | grep '^EA-[0-9]*' | head -n1 | cut -d"-" -f2 | cut -d" " -f1)"
     fi
 
@@ -50,13 +50,13 @@ updateBranch() {
 
 updateCompatibilityList() {
     local latestRevision oldUrl newUrl oldHash newHash oldDate newDate
-    latestRevision="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/flathub/org.yuzu_emu.yuzu/commits/master" | jq -r '.sha')"
+    latestRevision="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/flathub/org.yuzu_emu.yuzu/commits/master" | jq -r '.sha')"
 
     oldUrl="$(sed -n '/yuzu-compat-list/,/url/p' "$DEFAULT_NIX" | tail -n1 | cut -d'"' -f2)"
     newUrl="https://raw.githubusercontent.com/flathub/org.yuzu_emu.yuzu/${latestRevision}/compatibility_list.json"
 
     oldDate="$(sed -n '/last updated.*/p' "$DEFAULT_NIX" | rev | cut -d' ' -f1 | rev)"
-    newDate="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/flathub/org.yuzu_emu.yuzu/commits/${latestRevision}" \
+    newDate="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/flathub/org.yuzu_emu.yuzu/commits/${latestRevision}" \
         | jq -r '.commit.committer.date' | cut -d'T' -f1)"
 
     oldHash="$(sed -n '/yuzu-compat-list/,/sha256/p' "$DEFAULT_NIX" | tail -n1 | cut -d'"' -f2)"