From a854270fb3c53ffecd1aba530a5649f79cc4977c Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 30 Sep 2020 14:48:55 +0200 Subject: [PATCH] call hostname once --- a/kernel-gwh/SlackBuild | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/a/kernel-gwh/SlackBuild b/a/kernel-gwh/SlackBuild index 25f43f20..b0834a8c 100755 --- a/a/kernel-gwh/SlackBuild +++ b/a/kernel-gwh/SlackBuild @@ -3,8 +3,8 @@ set -e CWD=$(pwd) - -PRGNAM=$(basename $CWD)-$(hostname -s) +THIS_HOST=$(hostname -s) +PRGNAM=$(basename $CWD)-$THIS_HOST BUILD=${BUILD:-1} BRANCH=${BRANCH:-mainline} # stable ; mainline ARCH=$(uname -m) @@ -40,11 +40,11 @@ cd $PKG/usr/src/ ln -s linux-$VERSION linux cd linux-$VERSION -if [ -e $CWD/config-$(hostname -s)-$VERSION ] ; then - cp $CWD/config-$(hostname -s)-$VERSION .config +if [ -e $CWD/config-$THIS_HOST-$VERSION ] ; then + cp $CWD/config-$THIS_HOST-$VERSION .config else - if [ -e $CWD/config-$(hostname -s) ] ; then - cp $CWD/config-$(hostname -s) .config + if [ -e $CWD/config-$THIS_HOST ] ; then + cp $CWD/config-$THIS_HOST .config else zcat /proc/config.gz > .config fi