summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-04-22 10:02:39 +0200
committerRaymaekers Luca <luca@spacehb.net>2025-04-22 10:02:39 +0200
commit07c61562b4c9ba449e85508da71320f0e4fa3e09 (patch)
treec559dfb0b53f2c08e82c995ff0b38bd4a7762169 /bin
parentc822f6016fd9e457252b2f37dfa0be3cde9fefc3 (diff)
checkpoint
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/gt-cmd7
-rwxr-xr-xbin/extra/confirm16
2 files changed, 10 insertions, 13 deletions
diff --git a/bin/common/gt-cmd b/bin/common/gt-cmd
index 56b8df6..ebfe301 100755
--- a/bin/common/gt-cmd
+++ b/bin/common/gt-cmd
@@ -34,8 +34,11 @@ then
if ! ssh-add -L | grep "$(cat "$Keyfile")" > /dev/null
then
- printf '%s: '\''%s'\'' not in ssh-agent\n' "$repo_pretty" "$r"
- exit 1
+ if ! keyadd "$r" > /dev/null 2>&1
+ then
+ printf '%s: '\''%s'\'' not in ssh-agent\n' "$repo_pretty" "$r"
+ exit 1
+ fi
fi
fi
diff --git a/bin/extra/confirm b/bin/extra/confirm
index 630d701..7c653b9 100755
--- a/bin/extra/confirm
+++ b/bin/extra/confirm
@@ -1,12 +1,6 @@
#!/bin/sh
-
-read_char ()
-{
- old_stty_cfg=$(stty -g 2> /dev/null)
- stty raw -echo 2> /dev/null
- dd ibs=1 count=1 2> /dev/null
- stty "$old_stty_cfg" 2> /dev/null
-}
-
->&2 printf "%s " "$1"
-read_char | grep -q "[yY]"
+trap 'exit' INT
+old_stty_cfg=$(stty -g 2> /dev/null)
+stty raw -echo 2> /dev/null
+dd ibs=1 count=1 2> /dev/null
+stty "$old_stty_cfg" 2> /dev/null