diff --git a/install.sh b/install.sh index ffc9383..90a2f5b 100755 --- a/install.sh +++ b/install.sh @@ -44,7 +44,7 @@ PREFIX="${PREFIX:-/usr/local}" mkdir -p $PREFIX/share/archbox/bin mkdir -p $ETC_DIR install -v -D -m 755 ./src/archbox $PREFIX/bin/archbox -install -v -D -m 755 ./src/archbox-desktop.bash $PREFIX/bin/archbox-desktop +install -v -D -m 755 ./src/archbox-desktop $PREFIX/bin/archbox-desktop [[ ! -e /etc/archbox.conf || ! -z $FORCE_INSTALL_CONFIG ]] && genconfig > $ETC_DIR/archbox.conf install -v -D -m 755 ./src/exec.bash $PREFIX/share/archbox/bin/exec install -v -D -m 755 ./src/enter.bash $PREFIX/share/archbox/bin/enter diff --git a/src/archbox b/src/archbox index a1b476a..054d0eb 100644 --- a/src/archbox +++ b/src/archbox @@ -93,7 +93,7 @@ case $1 in "${PREFIX}"/share/archbox/bin/init start cp "${PREFIX}"/share/archbox/chroot_setup.bash "${CHROOT}"/chroot_setup printf "%s" $ARCHBOX_USER > /tmp/archbox_user - chroot $CHROOT /bin/bash -c "/chroot_setup" + chroot $CHROOT /bin/bash /chroot_setup exit $? ;; -e|--enter) diff --git a/src/archbox-desktop.bash b/src/archbox-desktop similarity index 100% rename from src/archbox-desktop.bash rename to src/archbox-desktop diff --git a/src/chroot_setup.bash b/src/chroot_setup.bash index f1340b6..d741caf 100644 --- a/src/chroot_setup.bash +++ b/src/chroot_setup.bash @@ -1,15 +1,26 @@ -#!/usr/bin/env bash +#!/bin/sh + +. /etc/archbox.conf >/dev/null 2>&1 + +set -- + +# Text colors/formatting +red="\033[38;5;1" +green="\033[38;5;2" +bold="\033[1m" +reset="\033[m" err(){ - echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" 1>&2 + printf "${red}${bold}%s${reset}\n" "==> $*" 1>&2 exit 1 } msg(){ - echo "$(tput bold)$(tput setaf 2)==> $@ $(tput sgr0)" + printf "${green}${bold}%s${reset}\n" "==> $*" 1>&2 } PATH=/usr/bin + msg "Initializing pacman keyrings..." pacman-key --init pacman-key --populate archlinux