Commit 61766ce7 authored by Aaditya Bagga's avatar Aaditya Bagga

Repository updated!

Went back to using upstream gentoo sources.
Not 1 but 3(!) methods added to sync with upstream repos: rsync, git, and svn.
Scripts updated to use new sources.
Some deprecated scripts removed.

Todo: system testing
parent 519f3a02

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

*~
*.swp
test
# tarballs
*.zip
*~
*.tar.*z*
# extra gentoo files
*.patch
*.diff
# local folders and files
/test
/logs
/rsync-include-list
Based upon [packages-openrc](https://github.com/manjaro/packages-openrc), this repository contains a set of OpenRC services with scripts to download and install the services.
A set of OpenRC services with scripts to download and install the services.
Currently these can be used on Slackware Linux.
......@@ -7,5 +7,3 @@ Currently these can be used on Slackware Linux.
* Slackbuilds: https://slackbuilds.org/repository/14.2/system/openrc-services/
* Documentation: http://docs.slackware.com/howtos:general_admin:openrc
* Originally hosted at: https://bitbucket.org/aadityabagga/openrc-services-ng
\ No newline at end of file
#!/bin/bash
# download-via-git.sh: downloads openrc scripts from gentoo sources
# for safety and robustness
set -e
# get source list
. "$(pwd)/source_list.sh"
# Test
if [ "$1" = -t ]; then
# Searching in the indices of CATEGORIES
for i in ${!CATEGORIES[*]}; do
# Now we get the actual category
k=${CATEGORIES[$i]}
# Now we need to evaluate the array pointed by CATEGORY index
eval "j=\${$i[*]}"
# Print programs in each category
for l in $j; do
echo "$k: $l"
done
done
exit 0
fi
REMOTE_REPO="gentoo"
REMOTE_REPO_URL="https://github.com/gentoo/gentoo.git"
# checking out selective directories via git
# https://askubuntu.com/a/645276/183206
mkdir -p "${REMOTE_REPO}"
cd "$REMOTE_REPO"
if [ ! -d .git ]; then
git init
git remote add origin "$REMOTE_REPO_URL"
git config core.sparseCheckout true
fi
cd -
sparse_checkout_file="${REMOTE_REPO}/.git/info/sparse-checkout"
[ -f "$sparse_checkout_file" ] && rm "$sparse_checkout_file"
./generate-sparse-checkout-list.sh >> "$sparse_checkout_file"
cd "$REMOTE_REPO"
git pull origin master
exit $?
#!/bin/bash
# download.sh: downloads openrc scripts from gentoo sources
# for safety and robustness
set -e
# get source list
. "$(pwd)/source_list.sh"
REMOTE_REPO="gentoo"
REMOTE_REPO_URL="rsync://rsync.de.gentoo.org/gentoo-portage"
# Test
if [ "$1" = -t ]; then
# Searching in the indices of CATEGORIES
for i in ${!CATEGORIES[*]}; do
# Now we get the actual category
k=${CATEGORIES[$i]}
# Now we need to evaluate the array pointed by CATEGORY index
eval "j=\${$i[*]}"
# Print programs in each category
for l in $j; do
echo "$k: $l"
done
done
exit 0
elif [ "$1" = -p ]; then
# Second argument is the package category
cat="$2"
# Third argument is the package name
package="$3"
# Checkout the source
folder_to_sync="$cat/$package/files"
mkdir -p "test123/$REMOTE_REPO/$folder_to_sync"
rsync -av "$REMOTE_REPO_URL/$folder_to_sync/*" "test123/$REMOTE_REPO/$folder_to_sync/"
# Exit with status
exit $?
fi
log="logs/download.log"
# Check for log directory
[ ! -d logs ] && mkdir logs
# Initialize log with date
date +"%F_%T" >> $log
# Checkout the source and write to log
[ -f "rsync-include-list" ] && rm "rsync-include-list"
./generate-rsync-include-list.sh >> "rsync-include-list"
mkdir -p "$REMOTE_REPO"
rsync -av --exclude '*.patch' --prune-empty-dirs --include-from "rsync-include-list" --exclude '*' "$REMOTE_REPO_URL/*" "$REMOTE_REPO/" 2>&1 | tee -a "$log"
exit $?
#!/bin/bash
# download.sh: downloads openrc scripts from gentoo sources
# Copyright (C) 2015-2018 Aaditya Bagga <aaditya_gnulinux@zoho.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed WITHOUT ANY WARRANTY;
# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##
# for safety and robustness
set -e
# get source list
. "$(pwd)/source_list.sh"
REMOTE_REPO="gentoo"
REMOTE_REPO_URL="https://github.com/gentoo/gentoo"
# Test
if [ "$1" = -t ]; then
# Searching in the indices of CATEGORIES
for i in ${!CATEGORIES[*]}; do
# Now we get the actual category
k=${CATEGORIES[$i]}
# Now we need to evaluate the array pointed by CATEGORY index
eval "j=\${$i[*]}"
# Print programs in each category
for l in $j; do
echo "$k: $l"
done
done
exit 0
elif [ "$1" = -p ]; then
# Second argument is the package category
cat="$2"
# Third argument is the package name
package="$3"
# Checkout the source
svn export --force "$REMOTE_REPO_URL/trunk/$cat/$package/files" "$REMOTE_REPO/$cat/$package/files"
# Exit with status
exit $?
fi
log="logs/download.log"
# Check for log directory
[ ! -d logs ] && mkdir logs
# Initialize log with date
date +"%F_%T" >> $log
# Searching in the indices of CATEGORIES
for i in ${!CATEGORIES[*]}; do
# Now we get the actual category
k=${CATEGORIES[$i]}
# Now we need to evaluate the array pointed by CATEGORY index
eval "j=\${$i[*]}"
for l in $j; do
# Checkout the source and write to log
svn export --force "$REMOTE_REPO_URL/trunk/$k/$l/files" "$REMOTE_REPO/$k/$l/files" 2>&1 | tee -a "$log"
done
done
# Some special downloads
SPECIAL_DOWNLOAD_FOLDERS=('app-admin/syslog-ng/files/3.7' 'sys-devel/distcc/files/3.2' 'net-fs/samba/files/4.2')
for folder in "${SPECIAL_DOWNLOAD_FOLDERS[@]}"; do
svn export --force "$REMOTE_REPO_URL/trunk/$folder" "$REMOTE_REPO/$folder" 2>&1 | tee -a "$log"
done
exit $?
#!/bin/bash
# download.sh: Downloads openrc PKGBUILDS from https://github.com/manjaro/packages-openrc
# and fetches the source for the files.
. "$(pwd)/functions.sh"
UPSTREAM_DIR=packages-openrc-master
# Remove files previously present
rm master.zip
# Download and extract packages-openrc-master.zip
wget -c https://github.com/manjaro/packages-openrc/archive/master.zip &&
unzip -uo master.zip
# Directories to download files for
DIRS_TO_CONSIDER=(openrc-accessible openrc-base openrc-desktop openrc-devel openrc-misc openrc-net openrc-video eudev-openrc)
cd $UPSTREAM_DIR