| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/1006327/cwd/usr/share/reportbug/ |
Upload File : |
#!/bin/bash
# Adapted from bits and pieces of /usr/bin/bug, to provide the functions
# that package says are permitted.
#
# /usr/bin/bug is:
# (C) 1996-2000 Christoph Lameter <clameter@debian.org>
# Nicolás Lichtmaier <nick@debian.org>
# Modifications:
# Copyright (C) 2000 Chris Lawrence <lawrencc@debian.org>
#
# You may freely redistribute, use and modify this software under the terms
# of the GNU General Public License.
set -e
# Wait for a keypress and put it in $KEY
getkey()
{
stty -icanon min 1 || true 2> /dev/null
KEY=$(dd bs=1 count=1 2> /dev/null)
stty icanon || true 2> /dev/null
KEY="${KEY:0:1}"
echo
}
export -f getkey
export YESNO="yYnN"
# Usage: yesno <prompt> "yep"|"nop" (<- default)
# output: REPLY
yesno()
{
while true; do
echo -n "$1"
getkey
# if 'n'
if [ "$KEY" = "${YESNO:2:1}" ] || [ "$KEY" = "${YESNO:3:1}" ]; then
REPLY=nop
return
fi
# if 'y'
if [ "$KEY" = "${YESNO:0:1}" ] || [ "$KEY" = "${YESNO:1:1}" ]; then
REPLY=yep
return
fi
# if \n
if [ "$KEY" = "" ]; then
REPLY=$2
return
fi
done
}
export -f yesno
#&>3
$1 3>|$2