Skip to content

Commit

Permalink
switch to a pipe permanently - support github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jun 14, 2024
1 parent 962b376 commit 58f0236
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,16 @@ install_dotenvx() {
# 1. setup tmpdir
local tmpdir=$(command mktemp -d)

# 2. download
# pipe="$tmpdir/pipe"
# mkfifo "$pipe"
curl $(progress_bar) --fail -L --proto '=https' -o "$tmpdir/$(filename)" "$(download_url)"

# curl $(progress_bar) --fail -L --proto '=https' "$(download_url)" > "$pipe" &
# sh -c "tar xz --no-overwrite-dir --no-same-permissions --no-same-owner --directory $(directory) < '$pipe'" &
# wait

# 3. decompress to install directory
sh -c "tar xz --directory $(directory) -f "$tmpdir/$(filename)""

# 4. clean up
# 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"

# warn of any conflict
Expand Down

0 comments on commit 58f0236

Please sign in to comment.