mirror of
https://github.com/sbopkg/sbopkg
synced 2024-09-19 22:40:19 +03:00
add support for git repos - thanks to ponce at LQ for initial patch and suggestions.
This commit is contained in:
parent
945ed55f4f
commit
b474cba048
@ -45,17 +45,25 @@ REPO_BRANCH=${REPO_BRANCH:-14.0}
|
|||||||
|
|
||||||
### NO CHANGES SHOULD BE NECESSARY BELOW THIS LINE ###
|
### NO CHANGES SHOULD BE NECESSARY BELOW THIS LINE ###
|
||||||
|
|
||||||
REPO_DIR=$REPO_ROOT/$REPO_NAME/$REPO_BRANCH
|
|
||||||
|
|
||||||
sanity_checks () {
|
sanity_checks () {
|
||||||
if [[ ! -e $SBOPKG_CONF || ! -w $QUEUEDIR || ! -d $REPO_DIR ]]; then
|
if [[ ! -e $SBOPKG_CONF ]]; then
|
||||||
echo "ERROR: $SBOPKG_CONF cannot be found or $QUEUEDIR"
|
echo "$SBOPKG_CONF not found."
|
||||||
echo "or $REPO_DIR do not exist or are not writable."
|
|
||||||
echo "Check the configurable variables at the top of the script."
|
echo "Check the configurable variables at the top of the script."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
. $SBOPKG_CONF
|
. $SBOPKG_CONF
|
||||||
fi
|
fi
|
||||||
|
if [ -d $REPO_ROOT/$REPO_NAME/.git ]; then
|
||||||
|
REPO_SUBPATH=$REPO_NAME
|
||||||
|
else
|
||||||
|
REPO_SUBPATH=$REPO_NAME/$REPO_BRANCH
|
||||||
|
fi
|
||||||
|
REPO_DIR=$REPO_ROOT/$REPO_SUBPATH
|
||||||
|
if [[ ! -w $QUEUEDIR || ! -d $REPO_DIR ]]; then
|
||||||
|
echo "ERROR: $QUEUEDIR or $REPO_DIR do not exist or are not writable."
|
||||||
|
echo "Check the configurable variables at the top of the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@ -96,7 +104,7 @@ parse_queuefile_requires () {
|
|||||||
echo "$DEP" >> $QUEUEFILE
|
echo "$DEP" >> $QUEUEFILE
|
||||||
parse_queuefile_requires $DEP
|
parse_queuefile_requires $DEP
|
||||||
elif [[ "$DEP" == "%README%" ]]; then
|
elif [[ "$DEP" == "%README%" ]]; then
|
||||||
echo "#%README% - see the $PARSEAPP README file. " >> $QUEUEFILE
|
echo "# %README% - see the $PARSEAPP README file. " >> $QUEUEFILE
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
@ -116,8 +124,8 @@ build_queuefile () {
|
|||||||
main_loop () {
|
main_loop () {
|
||||||
local MAINAPP="$1"
|
local MAINAPP="$1"
|
||||||
if [[ $MAINAPP == "_all" ]]; then
|
if [[ $MAINAPP == "_all" ]]; then
|
||||||
printf "Processing all SlackBuilds in the $REPO_NAME/$REPO_BRANCH repo..."
|
printf "Processing all SlackBuilds in the $REPO_SUBPATH repo..."
|
||||||
for INFO in $(find $REPO_ROOT/$REPO_NAME/$REPO_BRANCH -name *.info); do
|
for INFO in $(find $REPO_DIR -name *.info); do
|
||||||
printf "."
|
printf "."
|
||||||
. $INFO
|
. $INFO
|
||||||
build_queuefile
|
build_queuefile
|
||||||
@ -126,7 +134,7 @@ main_loop () {
|
|||||||
for MAINAPP in $PKG; do
|
for MAINAPP in $PKG; do
|
||||||
if search_package $MAINAPP; then
|
if search_package $MAINAPP; then
|
||||||
echo "Processing $MAINAPP."
|
echo "Processing $MAINAPP."
|
||||||
. $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/$PKGPATH/$MAINAPP.info
|
. $REPO_DIR/$PKGPATH/$MAINAPP.info
|
||||||
build_queuefile
|
build_queuefile
|
||||||
else
|
else
|
||||||
echo "$MAINAPP not found. Exiting."
|
echo "$MAINAPP not found. Exiting."
|
||||||
|
Loading…
Reference in New Issue
Block a user