From e54cd30d88e61c0b8b72ff448bd0f67ae5d0a9fa Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Sat, 25 Apr 2026 17:12:31 +0200 Subject: [PATCH] =?utf8?q?Wykonanie=20instrukcji=20shift,=20tylko=20wtedy?= =?utf8?q?=20gdy=20wyst=C4=99puje=20argument.=20Dodanie=20warunku=20pod=20?= =?utf8?q?kt=C3=B3rym=20b=C4=99dzie=20dodawany=20custom=20log.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- immudex-build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/immudex-build b/immudex-build index 73ce379..c033f8d 100755 --- a/immudex-build +++ b/immudex-build @@ -46,10 +46,8 @@ case $1 in esac shift; -if [ "$1" ]; then export cname=$1; fi -shift; -if [ "$1" ]; then export version=$1; fi -shift; +if [ "$1" ]; then export cname=$1; shift; fi +if [ "$1" ]; then export version=$1; shift; fi if [ ! -f /sbin/debootstrap ]; then create_enviroment @@ -143,8 +141,10 @@ export arch2=$(echo $archArg | sed 's/-//g'); echo "-==Setting changelog file for this image: $(date)==-" >> immudex_build.log; echo -n "Setting changelog file for this image..."; (source ${HOME}/immudex/versions/template.sh; make_changelog_file $arch2;) -echo "-== User custom changelog ==-" >> $FILE; -echo "${version}: ${@};" >> $FILE; +if [ $# -gt 0 ]; then + echo "-== User custom changelog ==-" >> $FILE; + echo "${version}: ${@};" >> $FILE; +fi if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi eval $(grep '^COMMIT' $FILE); -- 2.39.5