38c924e241
- use bash everywhere, the scripts are not posix shell compatible (bsc#1195391) OBS-URL: https://build.opensuse.org/request/show/950468 OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=591
39 lines
508 B
Sed
39 lines
508 B
Sed
#!/usr/bin/bash
|
|
|
|
while test "${1::2}" = "--" ; do
|
|
case "$1" in
|
|
--cflags=*)
|
|
cflags="${cflags:+$cflags }${1#*=}"
|
|
shift
|
|
;;
|
|
--cflags)
|
|
cflags="${cflags:+$cflags }$2"
|
|
shift 2
|
|
;;
|
|
--libs=*)
|
|
libs="${libs:+$libs }${1#*=}"
|
|
shift
|
|
;;
|
|
--libs)
|
|
libs="${libs:+$libs }$2"
|
|
shift 2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
sed -ri -e "
|
|
/^[[:blank:]]*--cflags\)/,/;;/ {
|
|
/;;/ a\\
|
|
--cflags)\\
|
|
echo $cflags\\
|
|
;;
|
|
d
|
|
}
|
|
/^[[:blank:]]*--libs\)/,/;;/ {
|
|
/;;/ a\\
|
|
--libs)\\
|
|
echo $libs\\
|
|
;;
|
|
d
|
|
}" ${1+"$@"}
|