summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-05-19 20:54:27 -0400
committerDavid P <megver83@parabola.nu>2018-05-19 20:54:27 -0400
commitc71bd1bca27ceb6931a9a239ce6f943e1143d5bd (patch)
treeb8bc0268d6291cd0992e7eccc568170051f5b8b2
parentf1994bccc6167b1251ca2929d40cd7372e6b2c81 (diff)
run.sh: add path variable
Signed-off-by: David P <megver83@parabola.nu>
-rwxr-xr-xrun.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/run.sh b/run.sh
index d9550e7..5f407de 100755
--- a/run.sh
+++ b/run.sh
@@ -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