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}
|
REPO_BRANCH=${REPO_BRANCH:-13.1}
|
||||||
KEEPLOG=YES
|
KEEPLOG=YES
|
||||||
LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log}
|
LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log}
|
||||||
DEBUG=0
|
DEBUG_UPDATES={$DEBUG_UPDATES:-0}
|
||||||
CLEANUP=NO
|
CLEANUP=NO
|
||||||
MKDIR_PROMPT=YES
|
MKDIR_PROMPT=YES
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ The default assignment is:
|
|||||||
\fCCLEANUP=NO\fP
|
\fCCLEANUP=NO\fP
|
||||||
.\"---------------------------------------------------------------------
|
.\"---------------------------------------------------------------------
|
||||||
.TP
|
.TP
|
||||||
.B DEBUG
|
.B DEBUG_UPDATES
|
||||||
Enumeration.
|
Enumeration.
|
||||||
.IP
|
.IP
|
||||||
This option should be set to
|
This option should be set to
|
||||||
@ -113,7 +113,7 @@ This option should be set to
|
|||||||
.BR 1 ,
|
.BR 1 ,
|
||||||
or
|
or
|
||||||
.BR 2 .
|
.BR 2 .
|
||||||
.B DEBUG
|
.B DEBUG_UPDATES
|
||||||
sets the default debugging level for the update list feature of
|
sets the default debugging level for the update list feature of
|
||||||
.BR sbopkg .
|
.BR sbopkg .
|
||||||
When set to
|
When set to
|
||||||
@ -127,7 +127,7 @@ When set to
|
|||||||
.BR 2 ,
|
.BR 2 ,
|
||||||
all non-updated packages are also listed.
|
all non-updated packages are also listed.
|
||||||
Changing
|
Changing
|
||||||
.B DEBUG
|
.B DEBUG_UPDATES
|
||||||
to
|
to
|
||||||
.B 1
|
.B 1
|
||||||
or
|
or
|
||||||
@ -136,7 +136,7 @@ may be helpful if it appears the updatelist might be missing an update.
|
|||||||
.IP
|
.IP
|
||||||
The default assignment is:
|
The default assignment is:
|
||||||
.IP
|
.IP
|
||||||
\fCDEBUG=0\fP
|
\fCDEBUG_UPDATES={$DEBUG_UPDATES:-0}\fP
|
||||||
.\"---------------------------------------------------------------------
|
.\"---------------------------------------------------------------------
|
||||||
.TP
|
.TP
|
||||||
.B DIFF
|
.B DIFF
|
||||||
|
@ -104,8 +104,8 @@ config_check() {
|
|||||||
[[ -e $HOME/.sbopkg.conf ]] && . $HOME/.sbopkg.conf
|
[[ -e $HOME/.sbopkg.conf ]] && . $HOME/.sbopkg.conf
|
||||||
|
|
||||||
# Some configuration options are mandatory
|
# Some configuration options are mandatory
|
||||||
for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME \
|
for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME REPO_BRANCH \
|
||||||
REPO_BRANCH KEEPLOG CLEANUP LOGFILE DEBUG TMP OUTPUT RSYNCFLAGS \
|
KEEPLOG CLEANUP LOGFILE DEBUG_UPDATES TMP OUTPUT RSYNCFLAGS \
|
||||||
WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI; do
|
WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI; do
|
||||||
if [[ -z "${!VAR}" ]]; then
|
if [[ -z "${!VAR}" ]]; then
|
||||||
MISSING+="$VAR "
|
MISSING+="$VAR "
|
||||||
@ -129,8 +129,8 @@ Please correct this error and run $SCRIPT again.
|
|||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ $DEBUG -ne 0 && $DEBUG -ne 1 && $DEBUG -ne 2 ]]; then
|
if [[ $DEBUG_UPDATES != [012] ]]; then
|
||||||
echo "The \$DEBUG variable must be set to 0, 1, or 2." 1>&2
|
echo "The DEBUG_UPDATES variable must be set to 0, 1, or 2." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ check_for_updates() {
|
|||||||
>> $UPDATELIST
|
>> $UPDATELIST
|
||||||
echo "-$NAME" >> $SBOPKGTMP/sbopkg-update-queue
|
echo "-$NAME" >> $SBOPKGTMP/sbopkg-update-queue
|
||||||
else
|
else
|
||||||
if [[ $DEBUG -eq 2 ]]; then
|
if [[ $DEBUG_UPDATES -eq 2 ]]; then
|
||||||
echo $NAME: >> $UPDATELIST
|
echo $NAME: >> $UPDATELIST
|
||||||
echo " No update." >> $UPDATELIST
|
echo " No update." >> $UPDATELIST
|
||||||
fi
|
fi
|
||||||
@ -823,7 +823,7 @@ check_for_updates() {
|
|||||||
"standard method, may be inaccurate." >> $UPDATELIST
|
"standard method, may be inaccurate." >> $UPDATELIST
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ $DEBUG -ge 1 ]]; then
|
if [[ $DEBUG_UPDATES -ge 1 ]]; then
|
||||||
echo $NAME: >> $UPDATELIST
|
echo $NAME: >> $UPDATELIST
|
||||||
echo " Not in the repository." >> $UPDATELIST
|
echo " Not in the repository." >> $UPDATELIST
|
||||||
fi
|
fi
|
||||||
@ -846,8 +846,9 @@ check_for_updates() {
|
|||||||
else
|
else
|
||||||
cat $UPDATELIST
|
cat $UPDATELIST
|
||||||
fi
|
fi
|
||||||
# Permanent log of the updatelist is saved when DEBUG is enabled.
|
# Permanent log of the updatelist is saved when DEBUG_UPDATES is
|
||||||
if [[ $DEBUG -ge 1 ]]; then
|
# enabled.
|
||||||
|
if [[ $DEBUG_UPDATES -ge 1 ]]; then
|
||||||
cp $UPDATELIST $SBOPKGTMP/sbopkg-debug-updatelist
|
cp $UPDATELIST $SBOPKGTMP/sbopkg-debug-updatelist
|
||||||
else
|
else
|
||||||
rm $UPDATELIST
|
rm $UPDATELIST
|
||||||
|
Loading…
Reference in New Issue
Block a user