mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-28 10:20:07 +00:00
35 lines
517 B
Bash
Executable File
35 lines
517 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# script for update REPO file using httpup-repgen
|
|
#
|
|
|
|
PORT_DIR=$(dirname $0)
|
|
|
|
if [ ! $(type -pa httpup-repgen) ]; then
|
|
echo "httpup not installed, aborting"
|
|
exit 1
|
|
fi
|
|
|
|
genrepo() {
|
|
while [ "$1" ]; do
|
|
if [ ! -d "$PORT_DIR/$1" ]; then
|
|
echo "Repository '$1' not exist!"
|
|
else
|
|
httpup-repgen "$PORT_DIR/$1"
|
|
fi
|
|
shift
|
|
done
|
|
}
|
|
|
|
if [ "$1" ]; then
|
|
genrepo "$@"
|
|
else
|
|
for repo in $(ls $PORT_DIR/); do
|
|
if [ -f "$PORT_DIR/$repo/REPO" ]; then
|
|
httpup-repgen "$PORT_DIR/$repo"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
exit 0
|