Update screen to use bash shell and adapt parse_keyfile output to… (#10)

Update screen to use bash shell and adapt parse_keyfile output to rem…
This commit is contained in:
Elliot Saba 2019-07-18 14:29:05 -07:00 committed by GitHub
commit 60310354e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# When we get killed, kill all our children
trap "exit" INT TERM

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Source in util.sh so we can have our nice tools
. $(cd $(dirname $0); pwd)/util.sh

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Helper function to output error messages to STDERR, with red text
error() {
@ -29,8 +29,9 @@ parse_keyfiles() {
# keyfiles), return 1 otherwise
keyfiles_exist() {
for keyfile in $(parse_keyfiles $1); do
if [ ! -f $keyfile ]; then
echo "Couldn't find keyfile $keyfile for $1"
currentfile=${keyfile//$'\r'/}
if [ ! -f $currentfile ]; then
echo "Couldn't find keyfile $currentfile for $1"
return 1
fi
done