diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-09-30 02:24:56 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-09-30 02:24:56 +0200 |
| commit | f368c60dc0c7e54706f335f16650a0e91979931a (patch) | |
| tree | 265d015aa0efe0bcfedf275e47f03261f138f9e4 | |
| parent | whoops, missed a slash (diff) | |
| download | gates-of-tartaros-f368c60dc0c7e54706f335f16650a0e91979931a.tar.gz gates-of-tartaros-f368c60dc0c7e54706f335f16650a0e91979931a.tar.bz2 gates-of-tartaros-f368c60dc0c7e54706f335f16650a0e91979931a.tar.xz | |
misc fixes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
| -rw-r--r-- | Makefile | 6 | ||||
| -rwxr-xr-x | got | 44 |
2 files changed, 27 insertions, 23 deletions
@@ -16,7 +16,7 @@ all: got.install got.py.install got-cmd.install got.install: got cp "$<" "$@" - sed -i 's:#!/usr/bin/env bash:$(BASH_SHEBANG):g' "$@" + sed -i 's:#!/usr/bin/env bash:#!$(BASH_SHEBANG):g' "$@" sed -i 's:@prefix@:$(PREFIX):g' "$@" sed -i 's:@etc@:$(SYSCONF):g' "$@" sed -i 's:@libexec@:$(LIBEXEC):g' "$@" @@ -24,11 +24,11 @@ got.install: got got.py.install: got.py cp "$<" "$@" - sed -i 's:#!/usr/bin/env python3:$(PY3_SHEBANG):g' "$@" + sed -i 's:#!/usr/bin/env python3:#!$(PY3_SHEBANG):g' "$@" got-cmd.install: got-cmd cp "$<" "$@" - sed -i 's:#!/usr/bin/env bash:$(BASH_SHEBANG):g' "$@" + sed -i 's:#!/usr/bin/env bash:#!$(BASH_SHEBANG):g' "$@" install: got.install got.py.install got-cmd.install @@ -18,26 +18,30 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. - -tty="$1" -shift 1 - -NAME="$(uname -o)" -ANSI_COLOR='01;34' # must be exactly ANSI_COLOR as it is defined in /etc/os-release -if [ -f "@etc@os-release" ]; then - . "@etc@os-release"p -fi - -if [ -f "@etc@@command@rc" ]; then - . "@etc@@command@rc" +if [ "$1" = "---" ]; then + tty="$2" + shift 2 + + NAME="$(uname -o)" + ANSI_COLOR='01;34' # must be exactly ANSI_COLOR as it is defined in /etc/os-release + if [ -f "@etc@/os-release" ]; then + . "@etc@/os-release" + fi + + if [ -f "@etc@/@command@rc" ]; then + . "@etc@/@command@rc" + else + echo -en '\e[H\e[2J' + echo -e "\e[${ANSI_COLOR}m${NAME} (${tty})\e[00m" + echo + echo -n 'Login: ' + fi + + tty_settings="$(stty --save)" + @prefix@@libexec@/@command@.py "$@" + stty "${tty_settings}" else - echo -en '\e[H\e[2J' - echo -e "\e[${ANSI_COLOR}m${NAME} (${tty})\e[00m" - echo - echo -n 'Login: ' + tty="/dev/$1" + "$0" --- "$@" > "${tty}" 2> "${tty}" < "${tty}" fi -tty_settings="$(stty --save)" -@prefix@@libexec@/@command@.py "$@" <> "/dev/${tty}" 2>&1 -stty "${tty_settings}" - |
