Skip to content

Commit

Permalink
fix: Webinstall on Linux/macOS (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 26, 2024
1 parent 7ce0db6 commit bc19a10
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions webinstall/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ if ! command -v unzip >/dev/null; then
exit 1
fi

if [ "$OS" = "Windows_NT" ]; then
ext="zip"
else
ext="tar.gz"
fi

if [ "$OS" = "Windows_NT" ]; then
target="win-x64"
else
Expand All @@ -38,18 +44,22 @@ else
esac
fi

eask_uri="https://github.com/emacs-eask/binaries/raw/master/${target}.zip"
eask_uri="https://github.com/emacs-eask/binaries/raw/master/${target}.${ext}"

eask_bin_dir=~/.local/bin
zip=$eask_bin_dir/eask.zip
dwd_file=$eask_bin_dir/eask.${ext}

mkdir -p $eask_bin_dir

curl -fsSL $eask_uri -o $zip
curl -fsSL $eask_uri -o $dwd_file

unzip -d "$eask_bin_dir" -o "$zip"
if [ "$OS" = "Windows_NT" ]; then
unzip -d "$eask_bin_dir" -o "$dwd_file"
else
tar -xvzf "$dwd_file" -C "$eask_bin_dir"
fi

rm $zip
rm $dwd_file

echo
echo "✓ Eask is installed in ${eask_bin_dir}."
Expand Down

0 comments on commit bc19a10

Please sign in to comment.