#!/bin/bash # Package name convention for dietlibc patches # dietlibc-patches-${PVR}.tar.bz2 # where # PVR is the package version + revision (i.e. 2.0.1-r1) if [ -z $1 ]; then echo "Usage: mkrelease []" exit 1 fi PVR=${1} [[ -n ${2} ]] && PVR=${1}-${2} P="dietlibc-patches-${PVR}.tar.bz2" tmpdir=$(mktemp -du) svn export . ${tmpdir} pushd ${tmpdir} >/dev/null pushd patches >/dev/null for dir in *; do [ "${dir}" == "${PVR}" ] && mv ${dir}/* . rm -rf "${dir}" done popd >/dev/null rm -f mkrelease popd >/dev/null tar cjvf ./${P} -C ${tmpdir} . | sort rm -rf ${tmpdir} echo "Tarball is at ./${P}"