diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-04-16 10:59:13 -0700 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-04-16 10:59:13 -0700 |
commit | 01fb98f402fdd703491c9f52414de2815d893cef (patch) | |
tree | 6d394918db9dd9a05de89ed34ce89fed7da62419 /hide_unfree | |
parent | 748600bf8dfba34b336ad642a6b26dae674db85f (diff) |
Stable branch for repm
Diffstat (limited to 'hide_unfree')
-rwxr-xr-x | hide_unfree | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/hide_unfree b/hide_unfree new file mode 100755 index 0000000..2dd02e8 --- /dev/null +++ b/hide_unfree @@ -0,0 +1,66 @@ +#!/bin/bash +# This script hides unfree packages that repo-maintainer takes read permissions off. + +repo_dir='/home/parabolavnx/parabolagnulinux.org/repo' + +there_are_packages_on_this_dirs=( + 'community/os/i686' + 'community/os/x86_64' + 'community-testing/os/i686' + 'community-testing/os/x86_64' + 'testing/os/i686' + 'testing/os/x86_64' + 'core/os/i686' + 'core/os/x86_64' + 'extra/os/i686' + 'extra/os/x86_64' + 'multilib/os/i686' + 'multilib/os/x86_64' +) + +copy_into_this_dirs=( + 'community/os/any' + 'community/os/i686' + 'community/os/x86_64' + 'core/os/any' + 'core/os/i686' + 'core/os/x86_64' + 'extra/os/any' + 'extra/os/i686' + 'extra/os/x86_64' + 'multilib/os/i686' + 'multilib/os/x86_64' + 'sources/packages' + 'sources/community' + 'community-testing/os/i686' + 'community-testing/os/x86_64' + 'testing/os/i686' + 'testing/os/x86_64' +) + +source_dirs=( + 'sources/packages' + 'sources/community' +) + +blacklist=($(cat /home/parabolavnx/parabolagnulinux.org/docs/{blacklist,pending-*}.txt | cut -d':' -f1)) +echo ${blacklist[@]} + +for dir in ${copy_into_this_dirs[@]}; do + cp --remove-destination ~/hide_unfree_index.php "${repo_dir}/${dir}/index.php" +done + +for unfree in ${blacklist[@]}; do + for source_dir in ${source_dirs[@]}; do + chmod -rx ${repo_dir}/${source_dir}/${unfree}-[0-9]*-*.src.tar.gz + done +done + +# Duplicate to avoid increasing the window of missing index.php that can show unfree packages +#for dir in ${there_are_packages_on_this_dirs[@]}; do +# # guess the repo name +# license-add ${repo_dir}/${dir}/$(echo "$dir" | cut -d'/' -f1).licenses.tar.gz ${repo_dir}/${dir}/*.pkg.tar.* +#done + + +exit 0 |