mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-27 09:58:28 +01:00
tweak the logic to determine ARCH; modify some evals and conditionals for ARCH (including removing an unset ARCH) in check_for_updates and info_item; thanks to slakmagik for his help and suggestions with the patch, including adding the redirects to /dev/null
This commit is contained in:
parent
29f3ec72eb
commit
a314a8d37d
2 changed files with 22 additions and 7 deletions
|
@ -18,5 +18,7 @@ enhancements:
|
|||
* Added an option to print the version of sbopkg. We try not to change the
|
||||
meaning of flags but note that this does change what was the '-v' flag to
|
||||
'-V' and now uses '-v' for its customary 'version' purpose.
|
||||
* Tweak the logic re determining ARCH and modify some ARCH-related
|
||||
evals and conditionals in check_for_updates and info_item.
|
||||
+--------------------------+
|
||||
|
||||
|
|
|
@ -704,9 +704,12 @@ check_for_updates() {
|
|||
|
||||
# Extract the new package version
|
||||
if [[ ! -z $NEWSB ]]; then
|
||||
unset ARCH BUILD
|
||||
eval NEW$(grep -m1 ^ARCH= $NEWSB)
|
||||
eval NEW$(grep -m1 ^BUILD= $NEWSB)
|
||||
unset BUILD
|
||||
eval NEW$(grep -m1 ^ARCH= $NEWSB) 2>/dev/null
|
||||
if [[ $NEWARCH != "noarch" ]]; then
|
||||
NEWARCH=$ARCH
|
||||
fi
|
||||
eval NEW$(grep -m1 ^BUILD= $NEWSB) 2>/dev/null
|
||||
[[ -z $NEWARCH ]] && NEWARCH=unknown
|
||||
|
||||
# Step 1 - find the version expression
|
||||
|
@ -1133,7 +1136,10 @@ info_item() {
|
|||
SHORTPATH=$REPO_DIR/$CATEGORY/$APP
|
||||
CURVERSION=$(grep VERSION $SHORTPATH/$APP.info |
|
||||
cut -d= -f2 | sed s/\"//g)
|
||||
eval CUR$(grep -m1 ^ARCH= $SHORTPATH/$APP.SlackBuild)
|
||||
eval CUR$(grep -m1 ^ARCH= $SHORTPATH/$APP.SlackBuild) 2>/dev/null
|
||||
if [[ $CURARCH != "noarch" ]]; then
|
||||
CURARCH=$ARCH
|
||||
fi
|
||||
eval CUR$(grep -m1 ^BUILD= $SHORTPATH/$APP.SlackBuild)
|
||||
[[ -z $CURARCH ]] && CURARCH=unknown
|
||||
while :; do
|
||||
|
@ -4385,9 +4391,16 @@ if [[ $(id -u) != 0 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Set up ARCH
|
||||
if [[ ! $(uname -m) =~ i.86 ]]; then
|
||||
export ARCH=${ARCH:-$(uname -m)}
|
||||
# Set up ARCH - borrowed from SBo SlackBuild template
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [[ -z "$ARCH" ]]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) export ARCH=i486 ;;
|
||||
arm*) export ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other
|
||||
# archs:
|
||||
*) export ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Set up BACKTITLE
|
||||
|
|
Loading…
Reference in a new issue