Index: utils/objfw-compile ================================================================== --- utils/objfw-compile +++ utils/objfw-compile @@ -13,17 +13,17 @@ # Public License, either version 2 or 3, which can be found in the file # LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this # file. # -if test x"$(basename $0)" != x"objfw-compile"; then - OBJFW_CONFIG="$(basename $0 | sed 's/-objfw-compile$//')-objfw-config" +if test x"$(basename "$0")" != x"objfw-compile"; then + OBJFW_CONFIG="$(basename "$0" | sed 's/-objfw-compile$//')-objfw-config" else OBJFW_CONFIG="objfw-config" fi -if ! which $OBJFW_CONFIG 2>&1 >/dev/null; then +if ! which $OBJFW_CONFIG >/dev/null 2>&1; then echo "You need to have ObjFW and $OBJFW_CONFIG installed!" exit 1 fi CPPFLAGS="$CPPFLAGS $($OBJFW_CONFIG --cppflags)" @@ -36,30 +36,33 @@ echo "Syntax: objfw-compile -o outname source1.m source2.m ..." exit 1 fi status_compiling() { - printf "\033[K\033[0;33mCompiling \033[1;33m$1\033[0;33m...\033[0m\r" + printf "\033[K\033[0;33mCompiling \033[1;33m%s\033[0;33m...\033[0m\r" \ + "$1" } status_compiled() { - printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$1\033[0;32m." + printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m%s\033[0;32m." \ + "$1" printf "\033[0m\n" } status_compile_failed() { - printf "\033[K\033[0;31mFailed to compile \033[1;31m$1\033[0;31m!" + printf "\033[K\033[0;31mFailed to compile \033[1;31m%s\033[0;31m!" "$1" printf "\033[0m\n" exit $2 } status_linking() { - printf "\033[K\033[0;33mLinking \033[1;33m$1\033[0;33m...\033[0m\r" + printf "\033[K\033[0;33mLinking \033[1;33m%s\033[0;33m...\033[0m\r" "$1" } status_linked() { - printf "\033[K\033[0;32mSuccessfully linked \033[1;32m$1\033[0;32m." + printf "\033[K\033[0;32mSuccessfully linked \033[1;32m%s\033[0;32m." \ + "$1" printf "\033[0m\n" } status_link_failed() { - printf "\033[K\033[0;31mFailed to link \033[1;31m$1\033[0;31m!" + printf "\033[K\033[0;31mFailed to link \033[1;31m%s\033[0;31m!" "$1" printf "\033[0m\n" exit $2 } srcs=""