From: Prarit Bhargava <prarit@xxxxxxxxxx> redhat/scripts/expand_srpm.sh: Use Makefile variables Exported Makefile variables are exported to all levels of scripts. Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> diff --git a/redhat/scripts/expand_srpm.sh b/redhat/scripts/expand_srpm.sh index blahblah..blahblah 100755 --- a/redhat/scripts/expand_srpm.sh +++ b/redhat/scripts/expand_srpm.sh @@ -1,18 +1,9 @@ #!/bin/sh -# $1: git source tree directory -# $2: cloned tree -# $3: package name -# $4: name of srpm -# shellcheck disable=SC2034 # tree, redhat unused +# $1: cloned tree +cloned="$1"; -tree="$1"; -cloned="$2"; -package_name="$3"; -redhat="$1/redhat"; -srpm="$4"; - -cd "$cloned/$package_name" || die "\"$cloned\" doesn't seem to have a dist-git clone"; +cd "$cloned/$PACKAGE_NAME" || die "\"$cloned\" doesn't seem to have a dist-git clone"; # delete everything in the cloned tree to avoid having stale files rm -r -- * @@ -23,7 +14,7 @@ echo "*.xz" > .gitignore echo "*.bz2" >> .gitignore # expand the srpm into the tree -rpm2cpio "$srpm" | cpio -idmv +rpm2cpio "$SRPM" | cpio -idmv git add -A diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh index blahblah..blahblah 100755 --- a/redhat/scripts/rh-dist-git.sh +++ b/redhat/scripts/rh-dist-git.sh @@ -32,7 +32,7 @@ $RHPKG_BIN switch-branch "$RHDISTGIT_BRANCH" || die "switching to branch $RHDIST echo "Copying updated files" # copy the required files (redhat/git/files) -"$REDHAT"/scripts/expand_srpm.sh "$TOPDIR" "$tmpdir" "$PACKAGE_NAME" "$SRPM"; +"$REDHAT"/scripts/expand_srpm.sh "$tmpdir"; echo "Uploading new tarballs" # upload tarballs -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1994 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue