implement basic first install
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
sudo true
|
||||
/bin/clear
|
||||
echo "
|
||||
|
||||
██████╗ ███████╗███████╗ ██████╗ ██╗ █████╗ ████████╗███████╗
|
||||
██╔══██╗██╔════╝██╔════╝██╔═══██╗██║ ██╔══██╗╚══██╔══╝██╔════╝
|
||||
██║ ██║█████╗ ███████╗██║ ██║██║ ███████║ ██║ █████╗
|
||||
██║ ██║██╔══╝ ╚════██║██║ ██║██║ ██╔══██║ ██║ ██╔══╝
|
||||
██████╔╝███████╗███████║╚██████╔╝███████╗██║ ██║ ██║ ███████╗
|
||||
╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝
|
||||
"
|
||||
|
||||
echo "INSTALLING PREREQUISITES
|
||||
"
|
||||
|
||||
echo "Installing git..."
|
||||
if ! sudo xbps-install -Sy git >/dev/null 2>&1; then
|
||||
echo "Failed to install git" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing gum..."
|
||||
if ! sudo xbps-install -Sy gum >/dev/null 2>&1; then
|
||||
echo "Failed to install gum" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
REPO_URL="https://git.desolate.land/desolate/land"
|
||||
TARGET_DIR="$HOME/.desolate"
|
||||
|
||||
if [ -d "$TARGET_DIR" ]; then
|
||||
rm -rf "$TARGET_DIR"
|
||||
fi
|
||||
|
||||
if gum spin --title="Downloading repository..." --show-error -- git clone --depth 1 "$REPO_URL" "$TARGET_DIR"; then
|
||||
"$TARGET_DIR/install.sh"
|
||||
else
|
||||
echo "
|
||||
Failed to download repository
|
||||
"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user