mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
Change DEBUG to DEBUG_UPDATES
Also shortened how we test for whether DEBUG(_UPDATES) is 0,1,2 and made DEBUG_UPDATES use default values if unset, rather than being set directly to a default value. This entire variable may be removed shortly but, until then, there's this.
This commit is contained in:
parent
4b35bdf032
commit
7461e231fa
@ -16,7 +16,7 @@ REPO_NAME=${REPO_NAME:-SBo}
|
||||
REPO_BRANCH=${REPO_BRANCH:-13.1}
|
||||
KEEPLOG=YES
|
||||
LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log}
|
||||
DEBUG=0
|
||||
DEBUG_UPDATES={$DEBUG_UPDATES:-0}
|
||||
CLEANUP=NO
|
||||
MKDIR_PROMPT=YES
|
||||
|
||||
|
@ -105,7 +105,7 @@ The default assignment is:
|
||||
\fCCLEANUP=NO\fP
|
||||
.\"---------------------------------------------------------------------
|
||||
.TP
|
||||
.B DEBUG
|
||||
.B DEBUG_UPDATES
|
||||
Enumeration.
|
||||
.IP
|
||||
This option should be set to
|
||||
@ -113,7 +113,7 @@ This option should be set to
|
||||
.BR 1 ,
|
||||
or
|
||||
.BR 2 .
|
||||
.B DEBUG
|
||||
.B DEBUG_UPDATES
|
||||
sets the default debugging level for the update list feature of
|
||||
.BR sbopkg .
|
||||
When set to
|
||||
@ -127,7 +127,7 @@ When set to
|
||||
.BR 2 ,
|
||||
all non-updated packages are also listed.
|
||||
Changing
|
||||
.B DEBUG
|
||||
.B DEBUG_UPDATES
|
||||
to
|
||||
.B 1
|
||||
or
|
||||
@ -136,7 +136,7 @@ may be helpful if it appears the updatelist might be missing an update.
|
||||
.IP
|
||||
The default assignment is:
|
||||
.IP
|
||||
\fCDEBUG=0\fP
|
||||
\fCDEBUG_UPDATES={$DEBUG_UPDATES:-0}\fP
|
||||
.\"---------------------------------------------------------------------
|
||||
.TP
|
||||
.B DIFF
|
||||
|
@ -104,8 +104,8 @@ config_check() {
|
||||
[[ -e $HOME/.sbopkg.conf ]] && . $HOME/.sbopkg.conf
|
||||
|
||||
# Some configuration options are mandatory
|
||||
for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME \
|
||||
REPO_BRANCH KEEPLOG CLEANUP LOGFILE DEBUG TMP OUTPUT RSYNCFLAGS \
|
||||
for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME REPO_BRANCH \
|
||||
KEEPLOG CLEANUP LOGFILE DEBUG_UPDATES TMP OUTPUT RSYNCFLAGS \
|
||||
WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI; do
|
||||
if [[ -z "${!VAR}" ]]; then
|
||||
MISSING+="$VAR "
|
||||
@ -129,8 +129,8 @@ Please correct this error and run $SCRIPT again.
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
if [[ $DEBUG -ne 0 && $DEBUG -ne 1 && $DEBUG -ne 2 ]]; then
|
||||
echo "The \$DEBUG variable must be set to 0, 1, or 2." 1>&2
|
||||
if [[ $DEBUG_UPDATES != [012] ]]; then
|
||||
echo "The DEBUG_UPDATES variable must be set to 0, 1, or 2." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -813,7 +813,7 @@ check_for_updates() {
|
||||
>> $UPDATELIST
|
||||
echo "-$NAME" >> $SBOPKGTMP/sbopkg-update-queue
|
||||
else
|
||||
if [[ $DEBUG -eq 2 ]]; then
|
||||
if [[ $DEBUG_UPDATES -eq 2 ]]; then
|
||||
echo $NAME: >> $UPDATELIST
|
||||
echo " No update." >> $UPDATELIST
|
||||
fi
|
||||
@ -823,7 +823,7 @@ check_for_updates() {
|
||||
"standard method, may be inaccurate." >> $UPDATELIST
|
||||
fi
|
||||
else
|
||||
if [[ $DEBUG -ge 1 ]]; then
|
||||
if [[ $DEBUG_UPDATES -ge 1 ]]; then
|
||||
echo $NAME: >> $UPDATELIST
|
||||
echo " Not in the repository." >> $UPDATELIST
|
||||
fi
|
||||
@ -846,8 +846,9 @@ check_for_updates() {
|
||||
else
|
||||
cat $UPDATELIST
|
||||
fi
|
||||
# Permanent log of the updatelist is saved when DEBUG is enabled.
|
||||
if [[ $DEBUG -ge 1 ]]; then
|
||||
# Permanent log of the updatelist is saved when DEBUG_UPDATES is
|
||||
# enabled.
|
||||
if [[ $DEBUG_UPDATES -ge 1 ]]; then
|
||||
cp $UPDATELIST $SBOPKGTMP/sbopkg-debug-updatelist
|
||||
else
|
||||
rm $UPDATELIST
|
||||
|
Loading…
Reference in New Issue
Block a user