Skip to content

Commit

Permalink
move to npm as registry
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jun 14, 2024
1 parent 93292f8 commit 7d5829d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,25 @@ install_dotenvx() {
# 1. setup tmpdir
local tmpdir=$(command mktemp -d)

# 2. download and unzip - inside pipe to support stricter installs like github actions
# curl -O https://registry.npmjs.org/@dotenvx/dotenvx-darwin-arm64/-/dotenvx-darwin-arm64-0.1.0.tgz
pipe="$tmpdir/pipe"
mkfifo "$pipe"
curl $(progress_bar) --fail -L --proto '=https' "$(download_url)" > "$pipe" &
TARBALL_URL="https://registry.npmjs.org/@dotenvx/dotenvx-darwin-arm64/-/dotenvx-darwin-arm64-0.1.0.tgz"
curl $(progress_bar) --fail -L --proto '=https' "$TARBALL_URL" > "$pipe" &
sh -c "
tar xz --directory $(directory) < '$pipe'
tar xz --directory $(directory) --strip-components=1 -f '$pipe' 'package/dotenvx'
" &
wait

# # 2. download and unzip - inside pipe to support stricter installs like github actions
# pipe="$tmpdir/pipe"
# mkfifo "$pipe"
# curl $(progress_bar) --fail -L --proto '=https' "$(download_url)" > "$pipe" &
# sh -c "
# tar xz --directory $(directory) < '$pipe'
# " &
# wait

# 3. clean up
rm -r "$tmpdir"

Expand Down

0 comments on commit 7d5829d

Please sign in to comment.