From bb0acf1c767ab222a63ec66c74db6cf59a20e54c Mon Sep 17 00:00:00 2001 From: fluorescent_haze Date: Wed, 1 Jun 2022 20:29:37 +0000 Subject: [PATCH] updater.sh: minor adjustments + remove non POSIX utility 'readlink' --- updater.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/updater.sh b/updater.sh index 584013a..77708eb 100755 --- a/updater.sh +++ b/updater.sh @@ -35,11 +35,11 @@ read_yn() { usage() { cat << EOF -Usage: updater.sh [options] [PROFILE] +usage: updater.sh [options] [] Update the user.js file and append custom configuration. -Options: +options: -e Activate ESR preferences -f Don't prompt for confirmation -h Show this help message @@ -91,7 +91,7 @@ if [ "$1" ]; then if [ -d "$1" ]; then dir="$1" else - die "'$1' isn't a valid directory" + die "'$1': no such directory" fi fi @@ -99,7 +99,7 @@ fi pmt_yn 'Update user.js and append custom configuration from user-overrides.js?' \ || exit 0 -[ "$dir" ] || dir="$(readlink -f "$0" | sed -E 's/\/[^\/]*$//')" +[ "$dir" ] || dir="$(echo "$0" | sed -E 's/\/[^\/]*$//')" cd "$dir" || die "Couldn't change directory to '$dir', aborting." # Assume that a valid firefox profile directory has a prefs.js file