|
@@ -1,4 +1,4 @@
|
|
|
-#!/bin/sh
|
|
|
+#!/bin/bash
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
@@ -326,8 +326,8 @@ helper_print_instruction() {
|
|
|
|
|
|
# $1 = what kind of thing
|
|
|
helper_prompt_overwrite() {
|
|
|
- printf "This %s already exists. Overwrite? (y/N)\n" "$1"
|
|
|
- read -r yn
|
|
|
+ read -N 1 -p "This $1 already exists. Overwrite? (y/N)" -r yn
|
|
|
+ echo
|
|
|
case ${yn} in
|
|
|
[Yy]* ) ;;
|
|
|
* ) printf "No confirmation, quitting.\n"; exit;;
|
|
@@ -352,8 +352,7 @@ helper_export_into() {
|
|
|
# $1 = prompt message
|
|
|
# $2 = target variable
|
|
|
helper_read_into() {
|
|
|
- printf '%s: ' "$1"
|
|
|
- read -r "$2"
|
|
|
+ read -erp "$1: " "$2"
|
|
|
}
|
|
|
|
|
|
# $1 = prompt message
|