diff --git a/install.sh b/install.sh index a75e2ce..afe69b4 100755 --- a/install.sh +++ b/install.sh @@ -4,19 +4,36 @@ ### INSTRUCTIONS AT https://github.com/gh2o/digitalocean-debian-to-arch/ ### ################################################################################ +run_from_file() { + local f t + for f in /dev/fd/*; do + [ -h ${f} ] || continue + [ ${f} -ef "${0}" ] && return + done + t=$(mktemp) + cat >${t} + if [ "$(head -n 1 ${t})" = '#!/bin/bash' ]; then + chmod +x ${t} + exec /bin/bash ${t} "$@" &2 - exit 1 -fi - if [ -n "${POSIXLY_CORRECT}" ] || [ -z "${BASH_VERSION}" ]; then unset POSIXLY_CORRECT - exec bash "$0" "$@" + exec /bin/bash "${0}" "$@" exit 1 fi