3 # Script used to generate the orig source tarball for libnfs.
5 LIBNFS_GIT_URL
="git://github.com/sahlberg/libnfs.git"
6 LIBNFS_GIT_TAG
="libnfs-1.3.0"
9 rm -rf "libnfs-${LIBNFS_VERSION}"
10 git clone
"$LIBNFS_GIT_URL" "libnfs-${LIBNFS_VERSION}"
11 cd "libnfs-${LIBNFS_VERSION}"
12 git checkout
"$LIBNFS_GIT_TAG"
16 # Remove temp files and other cruft from source tarball
17 # The find command snippet here was taken from debhelper's dh_clean command
18 # with some modification to delete more unneeded files.
19 echo "Removing temp files and other cruft from source tarball"
20 find libnfs-
${LIBNFS_VERSION} \
( \
( -type f
-a \
21 \
( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
22 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
23 -o -name '.*.orig' -o -name .
*.rej
-o -name '.SUMS' \
24 -o -name TAGS
-o \
( -path '*/.deps/*' -a -name '*.P' \
) \
25 -o -name config.status
-o -name config.cache
-o -name config.log \
26 \
) -exec rm -f "{}" \
; \
) -o \
27 \
( -type d
-a -name autom4te.cache
-prune -exec rm -rf "{}" \
; \
) \
)
28 rm -rf libnfs-
${LIBNFS_VERSION}/.git
29 rm -f libnfs-
${LIBNFS_VERSION}/.gitignore
31 # Remove empty directories
32 echo "Removing empty directories"
33 find libnfs-
${LIBNFS_VERSION} -type d
-empty -delete
35 tar --exclude-vcs -czf "libnfs_${LIBNFS_VERSION}.orig.tar.gz" \
36 "libnfs-${LIBNFS_VERSION}/"