Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 49 lines (37 sloc) 1.05 KB
#!/bin/sh
## ---------------------------------------------
## definitions
# where packages will be published
REPO=/srv/www/repo
## ---------------------------------------------
## internal declarations
# yabs builder script location
YABS="/usr/sbin/yabs-worker"
# where the packages will build
ROOTFS=/tmp/yabs-rootfs
# filename with list of used package repositories
REPO_LIST="/etc/yabs/repo.list"
## ---------------------------------------------
## main
set -e
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: $0 [directory-with-spec-files]" >&2
exit 1
fi
RUNDIR="$1"
[ -z "$RUNDIR" ] && RUNDIR=`pwd`
if [ -f "$RUNDIR" ]; then
SPECS="$RUNDIR"
elif [ -f "$RUNDIR"/specs.list ]; then
SPECS=`cat specs.list | \
grep --invert-match --extended-regexp '^\s*#'`
else
SPECS=`ls "$RUNDIR"/*.spec`
fi
for SPEC in $SPECS; do
echo -e "\n\n---------------CUT-HERE----------------\n\n"
[ -f "$SPEC" ] || continue
"$YABS" "$SPEC" "$ROOTFS" "$REPO" "$REPO_LIST"
( cd "$REPO"/RPMS
createrepo --update --quiet .; )
done
Jump to Line
Something went wrong with that request. Please try again.