Skip to content

Commit 5cf6101

Browse files
committed
bbb: DRY the code
1 parent 4dbf594 commit 5cf6101

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

terminal/bbb.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ if ${missing_dependencies}; then
2929
fi
3030

3131
if [[ -p /dev/stdin ]]; then
32-
base64 -d ; echo
32+
INPUT="$(cat -)"
3333
else
34-
echo -n "${*}" | base64 -d ; echo
34+
INPUT="${*}"
3535
fi
36+
37+
echo -n "${INPUT}" | base64 -d ; echo

0 commit comments

Comments
 (0)