diff options
author | David P <megver83@parabola.nu> | 2018-05-19 20:54:27 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2018-05-19 20:54:27 -0400 |
commit | c71bd1bca27ceb6931a9a239ce6f943e1143d5bd (patch) | |
tree | b8bc0268d6291cd0992e7eccc568170051f5b8b2 | |
parent | f1994bccc6167b1251ca2929d40cd7372e6b2c81 (diff) |
run.sh: add path variable
Signed-off-by: David P <megver83@parabola.nu>
-rwxr-xr-x | run.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -19,6 +19,7 @@ set -e version=$1 args=${@#$1} +path=${0%/*} usage() { cat <<EOM @@ -26,7 +27,7 @@ Usage: ${0##*/} [VERSION] [FILE1] [FILE2] ... Where VERSION should be the kernel version and FILE the config file(s). Example: ${0##*/} 4.14 /usr/src/linux-4.14/.config -To see a list of available versions, look at the files under the 'versions' +To see a list of available versions, look at the files under the $path/versions directory. EOM } @@ -40,7 +41,7 @@ err() { } check() { - if [ ! -f versions/$version ]; then + if [ ! -f $path/versions/$version ]; then err "Version $version not available" fi @@ -54,7 +55,7 @@ check() { } deblob() { - local configs=$(grep -v ^# versions/$version) + local configs=$(grep -v ^# $path/versions/$version) for c in $configs; do sed -i "s|$c=|# $c is not set|" $1 done |