Update the helper scripts from DeforaOS configure
This commit is contained in:
parent
e050df556b
commit
f7b003ce1f
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2012-2015 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2012-2017 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -114,7 +114,7 @@ _usage()
|
||||||
clean=0
|
clean=0
|
||||||
install=0
|
install=0
|
||||||
uninstall=0
|
uninstall=0
|
||||||
while getopts "ciuP:" name; do
|
while getopts "ciO:uP:" name; do
|
||||||
case "$name" in
|
case "$name" in
|
||||||
c)
|
c)
|
||||||
clean=1
|
clean=1
|
||||||
|
@ -123,6 +123,9 @@ while getopts "ciuP:" name; do
|
||||||
uninstall=0
|
uninstall=0
|
||||||
install=1
|
install=1
|
||||||
;;
|
;;
|
||||||
|
O)
|
||||||
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
|
;;
|
||||||
u)
|
u)
|
||||||
install=0
|
install=0
|
||||||
uninstall=1
|
uninstall=1
|
||||||
|
@ -137,7 +140,7 @@ while getopts "ciuP:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
@ -167,7 +170,7 @@ while [ $# -gt 0 ]; do
|
||||||
xpath="string(/refentry/refmeta/manvolnum)"
|
xpath="string(/refentry/refmeta/manvolnum)"
|
||||||
section=$($XMLLINT --xpath "$xpath" "$source")
|
section=$($XMLLINT --xpath "$xpath" "$source")
|
||||||
if [ $? -eq 0 -a -n "$section" ]; then
|
if [ $? -eq 0 -a -n "$section" ]; then
|
||||||
instdir="$DATADIR/man/html$section"
|
instdir="$MANDIR/html$section"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
pdf)
|
pdf)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2010-2015 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2010-2017 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -112,7 +112,7 @@ _gettext_pot()
|
||||||
clean=0
|
clean=0
|
||||||
install=0
|
install=0
|
||||||
uninstall=0
|
uninstall=0
|
||||||
while getopts "ciuP:" name; do
|
while getopts "ciO:uP:" name; do
|
||||||
case "$name" in
|
case "$name" in
|
||||||
c)
|
c)
|
||||||
clean=1
|
clean=1
|
||||||
|
@ -121,6 +121,9 @@ while getopts "ciuP:" name; do
|
||||||
uninstall=0
|
uninstall=0
|
||||||
install=1
|
install=1
|
||||||
;;
|
;;
|
||||||
|
O)
|
||||||
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
|
;;
|
||||||
u)
|
u)
|
||||||
install=0
|
install=0
|
||||||
uninstall=1
|
uninstall=1
|
||||||
|
@ -135,7 +138,7 @@ while getopts "ciuP:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $(($OPTIND - 1))
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2012-2016 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2012-2019 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -36,7 +36,6 @@ LIBEXECDIR=
|
||||||
MANDIR=
|
MANDIR=
|
||||||
PROGNAME="subst.sh"
|
PROGNAME="subst.sh"
|
||||||
SYSCONFDIR=
|
SYSCONFDIR=
|
||||||
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
|
|
||||||
#executables
|
#executables
|
||||||
CHMOD="chmod"
|
CHMOD="chmod"
|
||||||
DATE="date"
|
DATE="date"
|
||||||
|
@ -46,6 +45,7 @@ INSTALL="install"
|
||||||
MKDIR="mkdir -m 0755 -p"
|
MKDIR="mkdir -m 0755 -p"
|
||||||
RM="rm -f"
|
RM="rm -f"
|
||||||
SED="sed"
|
SED="sed"
|
||||||
|
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
|
||||||
|
|
||||||
|
|
||||||
#functions
|
#functions
|
||||||
|
@ -70,7 +70,7 @@ _subst()
|
||||||
LDSO="/libexec/ld-elf.so.1"
|
LDSO="/libexec/ld-elf.so.1"
|
||||||
;;
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
LDSO="/lib/ld-linux-$(uname -p).so.2"
|
LDSO="/lib/ld-linux-$(uname -m | tr _ -).so.2"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LDSO="/libexec/ld.elf_so"
|
LDSO="/libexec/ld.elf_so"
|
||||||
|
@ -112,6 +112,8 @@ _subst()
|
||||||
#create
|
#create
|
||||||
source="${target#$OBJDIR}"
|
source="${target#$OBJDIR}"
|
||||||
source="${source}.in"
|
source="${source}.in"
|
||||||
|
([ -z "$OBJDIR" ] || $DEBUG $MKDIR -- "${target%/*}") \
|
||||||
|
|| return 2
|
||||||
$DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;g" \
|
$DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;g" \
|
||||||
-e "s;@VERSION@;$VERSION;g" \
|
-e "s;@VERSION@;$VERSION;g" \
|
||||||
-e "s;@PREFIX@;$PREFIX;g" \
|
-e "s;@PREFIX@;$PREFIX;g" \
|
||||||
|
@ -123,8 +125,8 @@ _subst()
|
||||||
-e "s;@LIBDIR@;$LIBDIR;g" \
|
-e "s;@LIBDIR@;$LIBDIR;g" \
|
||||||
-e "s;@LIBEXECDIR@;$LIBEXECDIR;g" \
|
-e "s;@LIBEXECDIR@;$LIBEXECDIR;g" \
|
||||||
-e "s;@MANDIR@;$MANDIR;g" \
|
-e "s;@MANDIR@;$MANDIR;g" \
|
||||||
-e "s;@SYSCONFDIR@;$SYSCONFDIR;g" \
|
|
||||||
-e "s;@PWD@;$PWD;g" \
|
-e "s;@PWD@;$PWD;g" \
|
||||||
|
-e "s;@SYSCONFDIR@;$SYSCONFDIR;g" \
|
||||||
-- "$source" > "$target"
|
-- "$source" > "$target"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
$RM -- "$target" 2> "$DEVNULL"
|
$RM -- "$target" 2> "$DEVNULL"
|
||||||
|
@ -190,7 +192,7 @@ while getopts "ciuO:P:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $(($OPTIND - 1))
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user