diff --git a/sync.sh b/sync.sh index 5aa223d..40d102e 100755 --- a/sync.sh +++ b/sync.sh @@ -13,22 +13,22 @@ source "$DIR/framework/versions" node_installed_checksum_file="$DIR/framework/binaries/.node.checksum" node_installed_checksum="" if [ -f "$node_installed_checksum_file" ]; then - node_installed_checksum=$(cat "$node_installed_checksum_file") + node_installed_checksum=$(cat "$node_installed_checksum_file") fi if [ "$node_installed_checksum" != "$nodejs_checksum_linux_x86_64" ]; then - echo "Downloading Node.js..." - node_archive="$DIR/framework/downloads/node.tar.xz" - curl -fsSL "$nodejs_binary_linux_x86_64" -o "$node_archive" + echo "Downloading Node.js..." + node_archive="$DIR/framework/downloads/node.tar.xz" + curl -fsSL "$nodejs_binary_linux_x86_64" -o "$node_archive" - echo "Verifying checksum..." - echo "$nodejs_checksum_linux_x86_64 $node_archive" | sha256sum -c - + echo "Verifying checksum..." + echo "$nodejs_checksum_linux_x86_64 $node_archive" | sha256sum -c - - echo "Extracting Node.js..." - tar -xf "$node_archive" -C "$DIR/framework/binaries" - rm "$node_archive" + echo "Extracting Node.js..." + tar -xf "$node_archive" -C "$DIR/framework/binaries" + rm "$node_archive" - echo "$nodejs_checksum_linux_x86_64" >"$node_installed_checksum_file" + echo "$nodejs_checksum_linux_x86_64" >"$node_installed_checksum_file" fi # Ensure correct pnpm version is installed @@ -36,22 +36,22 @@ pnpm_binary="$DIR/framework/binaries/pnpm" pnpm_installed_checksum_file="$DIR/framework/binaries/.pnpm.checksum" pnpm_installed_checksum="" if [ -f "$pnpm_installed_checksum_file" ]; then - pnpm_installed_checksum=$(cat "$pnpm_installed_checksum_file") + pnpm_installed_checksum=$(cat "$pnpm_installed_checksum_file") fi # pnpm checksum includes "sha256:" prefix, strip it for sha256sum pnpm_checksum="${pnpm_checksum_linux_x86_64#sha256:}" if [ "$pnpm_installed_checksum" != "$pnpm_checksum" ]; then - echo "Downloading pnpm..." - curl -fsSL "$pnpm_binary_linux_x86_64" -o "$pnpm_binary" + echo "Downloading pnpm..." + curl -fsSL "$pnpm_binary_linux_x86_64" -o "$pnpm_binary" - echo "Verifying checksum..." - echo "$pnpm_checksum $pnpm_binary" | sha256sum -c - + echo "Verifying checksum..." + echo "$pnpm_checksum $pnpm_binary" | sha256sum -c - - chmod +x "$pnpm_binary" + chmod +x "$pnpm_binary" - echo "$pnpm_checksum" >"$pnpm_installed_checksum_file" + echo "$pnpm_checksum" >"$pnpm_installed_checksum_file" fi # Get golang binaries in place