Skip to content

Commit 0b0b03e

Browse files
authored
Update install.sh
1 parent a76983c commit 0b0b03e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# install.sh - install ObsidianOS from an normal arch host
2+
# ba.sh/ARbs - install ObsidianOS from an normal arch host
33

44
# Function to check if a command exists
55
check_command() {
@@ -15,7 +15,8 @@ check_command() {
1515
# Check for root
1616
if [[ $EUID -ne 0 ]]; then
1717
echo "This script must be run as root."
18-
exit 1
18+
echo "Attempting to run with sudo....."
19+
exec sudo -- bash -c "$(curl -fsSL https://ba.sh/ARbs)"
1920
fi
2021

2122
# Check for needed commands
@@ -30,7 +31,7 @@ TMPDIR="/tmp" # was something else but then obsidian-wizard would not like it
3031
clear
3132
echo "Starting ARbs, the ARch image Based inStaller..."
3233
echo "Bootstrapping obsidianctl and obsidian-wizard into /tmp..."
33-
rm "$TMPDIR/obsidian*" "/tmp/mkobsidiansfs" -rf||yes
34+
rm "$TMPDIR/obsidian*" "/tmp/mkobsidiansfs" -rf||true
3435
# Clone and prepare obsidian-wizard and obsidianctl
3536
git clone https://github.com/Obsidian-OS/obsidian-wizard "$TMPDIR/obsidian-wizard"
3637
git clone https://github.com/Obsidian-OS/obsidianctl "$TMPDIR/obsidianctl"

0 commit comments

Comments
 (0)