summaryrefslogtreecommitdiff
path: root/hide_unfree
diff options
context:
space:
mode:
Diffstat (limited to 'hide_unfree')
-rwxr-xr-xhide_unfree66
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