mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
Merge pull request #97938 from samuela/samuela/split-vscode-updates
vscode/vscodium: split update scripts
This commit is contained in:
commit
cffec69996
17
pkgs/applications/editors/vscode/update.sh → pkgs/applications/editors/vscode/update-vscode.sh
Executable file → Normal file
17
pkgs/applications/editors/vscode/update.sh → pkgs/applications/editors/vscode/update-vscode.sh
Executable file → Normal file
@ -8,10 +8,6 @@ if [ ! -f "$ROOT/vscode.nix" ]; then
|
||||
echo "ERROR: cannot find vscode.nix in $ROOT"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$ROOT/vscodium.nix" ]; then
|
||||
echo "ERROR: cannot find vscodium.nix in $ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# VSCode
|
||||
|
||||
@ -26,16 +22,3 @@ sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODE_LINUX_SHA256}\"/"
|
||||
VSCODE_DARWIN_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/darwin/stable"
|
||||
VSCODE_DARWIN_SHA256=$(nix-prefetch-url ${VSCODE_DARWIN_URL})
|
||||
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODE_DARWIN_SHA256}\"/" "$ROOT/vscode.nix"
|
||||
|
||||
# VSCodium
|
||||
|
||||
VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
|
||||
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"
|
||||
|
||||
VSCODIUM_LINUX_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-linux-x64-${VSCODIUM_VER}.tar.gz"
|
||||
VSCODIUM_LINUX_SHA256=$(nix-prefetch-url ${VSCODIUM_LINUX_URL})
|
||||
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"/" "$ROOT/vscodium.nix"
|
||||
|
||||
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"
|
23
pkgs/applications/editors/vscode/update-vscodium.sh
Executable file
23
pkgs/applications/editors/vscode/update-vscodium.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/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/vscodium.nix" ]; then
|
||||
echo "ERROR: cannot find vscodium.nix in $ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# VSCodium
|
||||
|
||||
VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
|
||||
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"
|
||||
|
||||
VSCODIUM_LINUX_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-linux-x64-${VSCODIUM_VER}.tar.gz"
|
||||
VSCODIUM_LINUX_SHA256=$(nix-prefetch-url ${VSCODIUM_LINUX_URL})
|
||||
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"/" "$ROOT/vscodium.nix"
|
||||
|
||||
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"
|
Loading…
Reference in New Issue
Block a user