]>
cvs.zerfleddert.de Git - m1-debian/blob - asahi-installer-bootstrap.sh
2 # SPDX-License-Identifier: MIT
6 export LC_ALL
=en_US.UTF-8
7 export LANG
=en_US.UTF-8
8 export PATH
="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
10 export VERSION_FLAG
=https
://cdn.asahilinux.org
/installer
/latest
11 export INSTALLER_BASE
=https
://cdn.asahilinux.org
/installer
12 export INSTALLER_DATA
=https
://tg.st
/u
/installer_data.json
13 export REPO_BASE
=https
://tg.st
/u
16 TMP
=/tmp
/asahi-install
19 echo "Bootstrapping installer:"
21 if [ -e "$TMP" ]; then
22 mv "$TMP" "$TMP-$(date +%Y%m%d-%H%M%S)"
28 echo " Checking version..."
30 PKG_VER
="$(curl --no-progress-meter -L "$VERSION_FLAG")"
31 echo " Version: $PKG_VER"
33 PKG
="installer-$PKG_VER.tar.gz"
35 echo " Downloading..."
37 curl
--no-progress-meter -L -o "$PKG" "$INSTALLER_BASE/$PKG"
38 if ! curl
--no-progress-meter -L -O "$INSTALLER_DATA"; then
39 echo " Error downloading installer_data.json."
47 echo " Initializing..."
50 if [ "$USER" != "root" ]; then
51 echo "The installer needs to run as root."
52 echo "Please enter your sudo password if prompted."
53 exec caffeinate
-dis sudo
-E .
/install.sh
"$@"
55 exec caffeinate
-dis .
/install.sh
"$@"