Skip to content

Commit

Permalink
Shell programming hygiene (#97884)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuela committed Sep 13, 2020
1 parent 972fc49 commit a8d6213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/applications/editors/vscode/update.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused gawk

set -eou pipefail

ROOT="$(dirname "$(readlink -f "$0")")"
if [ ! -f "$ROOT/vscode.nix" ]; then
echo "ERROR: cannot find vscode.nix in $ROOT"
Expand Down Expand Up @@ -36,4 +38,4 @@ sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"

VSCODIUM_DARWIN_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-darwin-${VSCODIUM_VER}.zip"
VSCODIUM_DARWIN_SHA256=$(nix-prefetch-url ${VSCODIUM_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODIUM_DARWIN_SHA256}\"/" "$ROOT/vscodium.nix"
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODIUM_DARWIN_SHA256}\"/" "$ROOT/vscodium.nix"

0 comments on commit a8d6213

Please sign in to comment.