]> cvs.zerfleddert.de Git - m1-debian/blame - asahi-installer-bootstrap.sh
more dependencies; bump versions
[m1-debian] / asahi-installer-bootstrap.sh
CommitLineData
51b255f0
TG
1#!/bin/sh
2# SPDX-License-Identifier: MIT
3
4set -e
5
6export LC_ALL=en_US.UTF-8
7export LANG=en_US.UTF-8
8export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
9
10export VERSION_FLAG=https://cdn.asahilinux.org/installer/latest
11export INSTALLER_BASE=https://cdn.asahilinux.org/installer
12export INSTALLER_DATA=https://tg.st/u/installer_data.json
13export REPO_BASE=https://tg.st/u
14
15#TMP="$(mktemp -d)"
16TMP=/tmp/asahi-install
17
18echo
19echo "Bootstrapping installer:"
20
21if [ -e "$TMP" ]; then
22 mv "$TMP" "$TMP-$(date +%Y%m%d-%H%M%S)"
23fi
24
25mkdir -p "$TMP"
26cd "$TMP"
27
28echo " Checking version..."
29
30PKG_VER="$(curl --no-progress-meter -L "$VERSION_FLAG")"
31echo " Version: $PKG_VER"
32
33PKG="installer-$PKG_VER.tar.gz"
34
35echo " Downloading..."
36
37curl --no-progress-meter -L -o "$PKG" "$INSTALLER_BASE/$PKG"
38if ! curl --no-progress-meter -L -O "$INSTALLER_DATA"; then
39 echo " Error downloading installer_data.json."
40 exit 1
41fi
42
43echo " Extracting..."
44
45tar xf "$PKG"
46
47echo " Initializing..."
48echo
49
50if [ "$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 "$@"
54else
55 exec caffeinate -dis ./install.sh "$@"
56fi
Impressum, Datenschutz