From ea23d5dff7b4e99e62ab582429f4a6f8b0263363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Tue, 19 Apr 2011 21:02:56 -0700 Subject: Ready for testing in regular usage --- get_license.sh | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'get_license.sh') diff --git a/get_license.sh b/get_license.sh index 024876c..b768cd5 100755 --- a/get_license.sh +++ b/get_license.sh @@ -19,27 +19,37 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License - # along with Parabola. If not, see . + # along with Parabola. If not, see . + source ./config source ./local_config source ./libremessages msg "Creating pending licenses list" -pushd ${licenses_dir} +pushd ${licenses_dir} >/dev/null rm -rf ${licenses_dir}/* +popd >/dev/null + +dir=$(mktemp -d ${tempdir}/licenses.XXXX) +pushd $dir > /dev/null -for repo in ${PKGREPOS[@]}; do +for repo in ${ARCHREPOS[@]}; do msg2 "Extracting licenses in ${repo}" - pending=($(cut -d: -f2 ${docs_dir}/pending-${repo})) - pushd ${repodir}/${repo} - for pkg in ${pending[@]}; do + pending=($(cut -d: -f1 ${docs_dir}/pending-${repo}.txt)) + for name in ${pending[@]}; do plain "${pkg}" - bsdtar -xf ${pkg} usr/share/licenses || { - error "${pkg} has no licenses" - } - chmod -r ${pkg} + for pkg in $(find ${repodir}/staging/${repo} -name "${name}-*${PKGEXT}" -printf '%f '); do + chmod +r ${pkg} + bsdtar -xf ${pkg} usr/share/licenses || { + error "${pkg} has no licenses" + } + chmod -r ${pkg} + done done done -popd -exit 0 \ No newline at end of file +mv ${dir}/* ${licenses_dir}/ +rm -rf ${dir} + + +exit 0 -- cgit v1.2.3-2-g168b