generated from demus/basic-rpm-template
Exclude the spec file from the sources list
They can during build if rpmautospec or something similiar is used
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]]; then
|
||||
if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]] || [ ! -f "$1" ]; then
|
||||
echo "Please provide one .spec file"
|
||||
echo "Usage: regenerate-from-spec <specfile>.spec"
|
||||
exit 1
|
||||
@@ -18,6 +18,7 @@ fi
|
||||
|
||||
# Update the sources checksums
|
||||
# We assume all files are lowercase except README and LICENSE files
|
||||
# The spec file itself is excluded
|
||||
echo Calculating checksums
|
||||
cksum -a sha512 {[a-z],README*,LICENSE*}!(ources) > sources
|
||||
cksum -a sha512 {[a-z],README*,LICENSE*}!(ources|*.spec) > sources
|
||||
echo Done
|
||||
|
||||
Reference in New Issue
Block a user