X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=arch-init;h=2f14ad60bc1485a6f325f722bab9c59863e1fe09;hb=HEAD;hp=a2517eeb5fb421a0911fce26afe8329198d55638;hpb=a027429011d313e0d9156fef9451f5a55a588163;p=automated-distro-installer diff --git a/arch-init b/arch-init index a2517ee..6a3786f 100755 --- a/arch-init +++ b/arch-init @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash # Copyright (C) 2016 Ian Kelling # This program is free software; you can redistribute it and/or @@ -15,10 +15,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +set -e; . /usr/local/lib/bash-bear; set +e -x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +cd "$this_dir" + +set -x export HOSTNAME="$1" mirror=$2