summaryrefslogtreecommitdiff
path: root/get_license.sh
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-19 21:02:56 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-19 21:02:56 -0700
commitea23d5dff7b4e99e62ab582429f4a6f8b0263363 (patch)
treeb86b885a63716fdbd5de0d61fb7d5b41b129ab4b /get_license.sh
parent3ea44b887b3386219c3a9b176f2458fbd522baa7 (diff)
Ready for testing in regular usage
Diffstat (limited to 'get_license.sh')
-rwxr-xr-xget_license.sh34
1 files changed, 22 insertions, 12 deletions
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 <http://www.gnu.org/licenses/>.
+ # along with Parabola. If not, see <http://www.gnu.org/licenses/>.
+
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