Remove bash-only features for sh scripts

Fix order of CC arguments to aid in linking on newer versions
This commit is contained in:
davidovki 2023-02-07 11:35:22 +00:00
parent 4e0b961fcb
commit 122437115d
2 changed files with 9 additions and 9 deletions

View File

@ -1,15 +1,15 @@
#!/bin/bash #!/bin/sh
CC=clang CC=clang
SRC=rose.c SRC=rose.c
REQS= #./plugins/*/*.c REQS= #./plugins/*/*.c
DEPS=('webkit2gtk-4.0') DEPS='webkit2gtk-4.0'
INCS=`pkg-config --cflags ${DEPS[@]}` INCS=`pkg-config --cflags ${DEPS}`
LIBS=`pkg-config --libs ${DEPS[@]}` LIBS=`pkg-config --libs ${DEPS}`
# Optional adblocking depends on https://github.com/jun7/wyebadblock # Optional adblocking depends on https://github.com/jun7/wyebadblock
WYEBAB='-L/usr/lib/wyebrowser/adblock.so' WYEBAB='-L/usr/lib/wyebrowser/adblock.so'
cp -f config.def.h config.h cp -f config.def.h config.h
$CC $INCS $LIBS $REQS $SRC $WYEBAB -o rose $CC $INCS $REQS $SRC -o rose $LIBS $WYEBAB

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/sh
test "$1" = "--help" || test -z "$1" && { test "$1" = "--help" || test -z "$1" && {
echo -e "usage: rose-mklink <alias> <url>\n" printf "%s\n" "usage: rose-mklink <alias> <url>" \
echo "Create a /usr/bin link to a website." "Create a /usr/bin link to a website."
exit exit
} }
@ -12,6 +12,6 @@ test -z "$2" || {
exit 1 exit 1
} }
echo -e "#!/bin/sh\n\nrose $2" > /usr/bin/$1 printf "#!/bin/sh\n\nrose %s" "$2" > /usr/bin/$1
chmod +x /usr/bin/$1 chmod +x /usr/bin/$1
} }