|
| 1 | +#!/bin/sh |
| 2 | + |
| 3 | +# Copyright 2023 the Eask authors. |
| 4 | + |
| 5 | +# This program is free software; you can redistribute it and/or modify |
| 6 | +# it under the terms of the GNU General Public License as published by |
| 7 | +# the Free Software Foundation; either version 3, or (at your option) |
| 8 | +# any later version. |
| 9 | + |
| 10 | +# This program is distributed in the hope that it will be useful, |
| 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +# GNU General Public License for more details. |
| 14 | + |
| 15 | +# You should have received a copy of the GNU General Public License |
| 16 | +# along with GNU Emacs; see the file COPYING. If not, write to the |
| 17 | +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | +# Boston, MA 02110-1301, USA. |
| 19 | + |
| 20 | +## Commentary: |
| 21 | +# |
| 22 | +# TODO(everyone): Keep this script simple and easily auditable. |
| 23 | +# |
| 24 | + |
| 25 | +set -e |
| 26 | + |
| 27 | +$URL=https://github.com/emacs-eask/binaries/raw/master/linux-x64.zip |
| 28 | + |
| 29 | +if [ "$OS" = "Windows_NT" ]; then |
| 30 | + target="win-x64" |
| 31 | +else |
| 32 | + case $(uname -sm) in |
| 33 | + "Darwin x86_64") target="macos-x64" ;; |
| 34 | + "Darwin arm64") target="macos-arm64" ;; |
| 35 | + "Linux aarch64") |
| 36 | + echo "Error: Official Deno builds for Linux aarch64 are not available. (see: https://github.com/denoland/deno/issues/1846 )" 1>&2 |
| 37 | + exit 1 |
| 38 | + ;; |
| 39 | + *) target="linux-x64" ;; |
| 40 | + esac |
| 41 | +fi |
| 42 | + |
| 43 | +eask_uri="https://github.com/emacs-eask/binaries/raw/master/${target}.zip" |
| 44 | + |
| 45 | +eask_bin_dir=~/.local/bin |
| 46 | +zip=$eask_bin_dir/eask.zip |
| 47 | + |
| 48 | +mkdir -p $eask_bin_dir |
| 49 | + |
| 50 | +curl -fsSL eask_uri -o $zip |
| 51 | + |
| 52 | +tar -xf $zip -C $eask_bin_dir |
| 53 | + |
| 54 | +rm $zip |
| 55 | + |
| 56 | +echo "✓ Eask is installed in %EAKS_BIN_DIR%." |
| 57 | +echo |
| 58 | +echo "Don't forget to add ${eask_bin_dir} to PATH environment variable:" |
| 59 | +echo |
| 60 | +echo " export PATH=\"${eask_bin_dir}:\$PATH\"" |
| 61 | + |
0 commit comments