os/+arch: update bootstrap/install scripts

This commit is contained in:
Henrik Lissner 2017-05-05 21:23:58 +02:00
parent e7e0b78faa
commit 7ed86391af
2 changed files with 16 additions and 16 deletions

View file

@ -32,8 +32,6 @@ read -rp "Hostname:\t" host
echo "$host" > "$MOUNT/etc/hostname" echo "$host" > "$MOUNT/etc/hostname"
# ensure keys are up to date # ensure keys are up to date
pacman-key --init
pacman-key --populate arch-linux
pacman-key --refresh-keys pacman-key --refresh-keys
pacman -Syy pacman -Syy
@ -41,14 +39,12 @@ pacman -Syy
pac base base-devel intel-ucode pac base base-devel intel-ucode
# device mounting drivers # device mounting drivers
pac dosfstools ntfs-3g exfat-utils hfsprogs pac dosfstools ntfs-3g exfat-utils hfsprogs
# nc
pac gnu-netcat
# networking support # networking support
WIRELESS_DEV=$(ip link | grep wlp | awk '{print $2}'| sed 's/://' | sed '1!d') WIRELESS_DEV=$(ip link | grep wlp | awk '{print $2}'| sed 's/://' | sed '1!d')
if [[ $WIRELESS_DEV ]]; then if [[ $WIRELESS_DEV ]]; then
echo "==> ${WIRELESS_DEV} interface detected" echo "==> ${WIRELESS_DEV} interface detected"
pac iw wireless_tools wpa_actiond wpa_supplicant dialog pac iw wireless_tools wpa_actiond wpa_supplicant dialog netctl
fi fi
WIRED_DEV=$(ip link | grep "en[sop]" | awk '{print $2}'| sed 's/://' | sed '1!d') WIRED_DEV=$(ip link | grep "en[sop]" | awk '{print $2}'| sed 's/://' | sed '1!d')

View file

@ -32,12 +32,16 @@ $pacman -S wget git curl tree rsync openssh dnsutils
# Set up pacaur (AUR helper) # Set up pacaur (AUR helper)
if ! exists pacaur; then if ! exists pacaur; then
pushd $(mktemp -d) TEMP="$(mktemp -d)"
function cleanup {
rm -rf "$TEMP"
}
trap cleanup EXIT
pushd "$TEMP"
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower && makepkg --needed --noconfirm --skippgpcheck -sri curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower && makepkg --needed --noconfirm --skippgpcheck -sri
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur && makepkg --needed --noconfirm --skippgpcheck -sri curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur && makepkg --needed --noconfirm --skippgpcheck -sri
TEMP=$(pwd)
popd popd
rm -rf "$TEMP"
if ! exists pacaur; then if ! exists pacaur; then
>&2 echo "Pacaur wasn't successfully installed" >&2 echo "Pacaur wasn't successfully installed"
@ -49,13 +53,19 @@ fi
## Bootstrap ## Bootstrap
# Helpful utilities # Helpful utilities
$pacaur -S the_silver_searcher tmux hub bc keybase-bin cronie $pacaur -S the_silver_searcher tmux hub bc keybase-bin cronie
systemctl enable cronie.service sudo systemctl enable cronie.service
if [[ -z $SERVER ]]; then if [[ -z $SERVER ]]; then
if exists crontab; then if exists crontab; then
[[ -f $PWD/crontab ]] && crontab $PWD/crontab [[ -f $PWD/crontab ]] && crontab "$PWD/crontab"
fi fi
hookdest=/etc/pacman.d/hooks
sudo mkdir -p "$hookdest"
for hook in $PWD/$hookdest/*.hook; do
[[ -f $hookdest/${hook##*/} ]] || sudo ln -svf "$hook" "$hookdest/"
done
# desktop essentials # desktop essentials
$pacaur -S \ $pacaur -S \
xorg-xinit xorg-server \ xorg-xinit xorg-server \
@ -67,10 +77,4 @@ if [[ -z $SERVER ]]; then
redshift chromium chromium-widevine \ redshift chromium chromium-widevine \
alsa-utils \ alsa-utils \
dictd dict-gcide dictd dict-gcide
hookdest=/etc/pacman.d/hooks
sudo mkdir -p "$hookdest"
for hook in $PWD/$hookdest/*.hook; do
[[ -f $hookdest/${hook##*/} ]] || sudo ln -svf $hook $hookdest/
done
fi fi