diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-23 08:28:21 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-23 08:28:21 +0000 |
commit | 05ef2b2adeb154f7d7fc92089757214d9e0e45ab (patch) | |
tree | a2e0aa5c01b0026bdc02f9aa86b2752bcb5b3d8a | |
parent | - display the repo in verbose mode when it is not gentoo (diff) | |
download | portage-utils-0.2.tar.gz portage-utils-0.2.tar.bz2 portage-utils-0.2.zip |
build release from clean tarballv0.2
-rwxr-xr-x | make-tarball.sh | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/make-tarball.sh b/make-tarball.sh index c8d7af8..fbe4e83 100755 --- a/make-tarball.sh +++ b/make-tarball.sh @@ -1,33 +1,29 @@ #!/bin/bash +set -e + if [[ $# -ne 1 ]] ; then echo "Usage: $0 <ver>" 1>&2 exit 1 fi -old_files=$(find . -name '.#*' -o -name '*.o') -if [[ -n ${old_files} ]] ; then - echo "Remove these temp files before making a package:" - echo "${old_files}" - exit 1 -fi -find . -perm -1 -exec chmod u+rwx '{}' \; -find . -type d -exec chmod 755 '{}' \; -find . -name '*.c' -exec chmod 644 '{}' \; -find . -name '*.h' -exec chmod 644 '{}' \; -find . -name '*.1' -exec chmod 644 '{}' \; -chmod 644 COPYING HACKING Makefile README TODO ver="$1" [[ "$ver" == "snap" ]] && ver=$(date -u +%Y%m%d) -bn="$(basename $(pwd))-${ver}" -[[ -d "${bn}" ]] && rm -r "${bn}" -mkdir "${bn}" || exit 1 -cp -r .depend Makefile README TODO *.[ch] qsync man libq tests "${bn}/" || exit 1 -APPLETS=$(awk -F'"' '{print $2}' include_applets.h | cut -d . -f 1) -for applet in ${APPLETS} ; do - [[ $applet != q ]] && echo $applet -done | sort > "${bn}"/applet-list -find "${bn}" -type d -name CVS -exec rm -rf '{}' \; 2>/dev/null -tar jcf "${bn}".tar.bz2 ${bn} || exit 1 -rm -r "${bn}" || exit 1 -du -b "${bn}".tar.bz2 +p="portage-utils-$ver" + +rm -rf "${p}" +mkdir "${p}" + +echo "Checking out clean cvs sources ..." +cp -a CVS "${p}"/ +cd "${p}" +cvs -Q up +cd .. + +echo "Generating tarball ..." +find "${p}" -type d -name CVS -prune -print0 | xargs -0 rm -rf +tar jcf "${p}".tar.bz2 "${p}" +rm -r "${p}" +du -b "${p}".tar.bz2 + +exit 0 |