Merge pull request #6499 from Duncaen/portability
xbps-src: portability fixes
This commit is contained in:
commit
e106541aaa
|
@ -148,7 +148,7 @@ chroot_sync_repos() {
|
||||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||||
# Copy host keys to the target rootdir.
|
# Copy host keys to the target rootdir.
|
||||||
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
||||||
cp -a $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
|
cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
|
||||||
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
||||||
# Make sure to sync index for remote repositories.
|
# Make sure to sync index for remote repositories.
|
||||||
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
||||||
|
|
6
xbps-src
6
xbps-src
|
@ -415,7 +415,7 @@ XBPS_OPTIONS=
|
||||||
XBPS_OPTSTRING="a:CEfgGhH:Ij:Lm:No:r:tV"
|
XBPS_OPTSTRING="a:CEfgGhH:Ij:Lm:No:r:tV"
|
||||||
|
|
||||||
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
|
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
|
||||||
eval set -- $(getopt -- "$XBPS_OPTSTRING" "$@");
|
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
|
||||||
|
|
||||||
while getopts "$XBPS_OPTSTRING" opt; do
|
while getopts "$XBPS_OPTSTRING" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
|
@ -425,12 +425,12 @@ while getopts "$XBPS_OPTSTRING" opt; do
|
||||||
f) readonly XBPS_BUILD_FORCEMODE=1; XBPS_OPTIONS+=" -f";;
|
f) readonly XBPS_BUILD_FORCEMODE=1; XBPS_OPTIONS+=" -f";;
|
||||||
G) readonly XBPS_USE_GIT_REVS=1; XBPS_OPTIONS+=" -G";;
|
G) readonly XBPS_USE_GIT_REVS=1; XBPS_OPTIONS+=" -G";;
|
||||||
g) readonly XBPS_DEBUG_PKGS=1; XBPS_OPTIONS+=" -g";;
|
g) readonly XBPS_DEBUG_PKGS=1; XBPS_OPTIONS+=" -g";;
|
||||||
H) readonly XBPS_HOSTDIR="$(readlink -m $OPTARG 2>/dev/null)"; XBPS_OPTIONS+=" -H $XBPS_HOSTDIR";;
|
H) readonly XBPS_HOSTDIR="$(readlink -f $OPTARG 2>/dev/null)"; XBPS_OPTIONS+=" -H $XBPS_HOSTDIR";;
|
||||||
h) usage && exit 0;;
|
h) usage && exit 0;;
|
||||||
I) readonly XBPS_SKIP_DEPS=1; XBPS_OPTIONS+=" -I";;
|
I) readonly XBPS_SKIP_DEPS=1; XBPS_OPTIONS+=" -I";;
|
||||||
j) export XBPS_MAKEJOBS="$OPTARG"; XBPS_OPTIONS+=" -j $OPTARG";;
|
j) export XBPS_MAKEJOBS="$OPTARG"; XBPS_OPTIONS+=" -j $OPTARG";;
|
||||||
L) export NOCOLORS=1; XBPS_OPTIONS+=" -L";;
|
L) export NOCOLORS=1; XBPS_OPTIONS+=" -L";;
|
||||||
m) readonly XBPS_MASTERDIR=$(readlink -m $OPTARG 2>/dev/null); XBPS_OPTIONS+=" -m $XBPS_MASTERDIR";;
|
m) readonly XBPS_MASTERDIR=$(readlink -f $OPTARG 2>/dev/null); XBPS_OPTIONS+=" -m $XBPS_MASTERDIR";;
|
||||||
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
|
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
|
||||||
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
|
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
|
||||||
r) readonly XBPS_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+=" -r $OPTARG";;
|
r) readonly XBPS_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+=" -r $OPTARG";;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user