carbs

Cem's Auto Rice Bootstrapping Scripts
git clone git://git.ckyln.com/carbs.git
Log | Files | Refs | README | LICENSE

commit 2ba918f205568964b96534f3d17f4ac3c34c1c6e
parent b08af94e13f5249b990db3b5183b2fc618c390e3
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri,  4 Oct 2019 14:45:04 +0300

use realpath

Diffstat:
Mcarbs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/carbs b/carbs @@ -54,9 +54,9 @@ fi while getopts ':p::d::r:n:P::k:' flag; do case $flag in P) git archive --remote=git://git.ckyln.com/carbs.git HEAD progs.csv | tar -xO > $OPTARG && exit || die 'Could not download progs.csv' ;; - p) [ -e $OPTARG ] && progs=$OPTARG || die 'Could not find progs.csv file' ;; + p) [ -e $OPTARG ] && progs="$(realpath $OPTARG)" || die 'Could not find progs.csv file' ;; r) git ls-remote $OPTARG >/dev/null 2>&1 && dotfiles=$OPTARG || die 'Could not find repo' ;; - d) [ -d $OPTARG ] && targetdir=$OPTARG || die 'Target location %s does not exist or is not a directory' "$OPTARG" ;; + d) [ -d $OPTARG ] && targetdir="$(realpath $OPTARG)" || die 'Target location %s does not exist or is not a directory' "$OPTARG" ;; n) sudo -V >/dev/null 2>&1 && interactive=0 || die 'Sudo must be installed in order to have a non interactive installation' ;; k) XK=$OPTARG ;; :) die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG" ;;