From 45e6e73d851e6d847ac2757862bbfd8d8b2612b9 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 23 Aug 2022 02:55:30 +0200 Subject: [PATCH] misc: move some scripts from src/stub/scripts to misc/scripts --- .github/travis_build.sh | 2 +- {src/stub => misc}/scripts/check_whitespace.sh | 0 {src/stub => misc}/scripts/check_whitespace_git.sh | 2 +- {src/stub => misc}/scripts/upx-clang-format | 0 src/Makefile | 6 +++--- 5 files changed, 5 insertions(+), 5 deletions(-) rename {src/stub => misc}/scripts/check_whitespace.sh (100%) rename {src/stub => misc}/scripts/check_whitespace_git.sh (97%) rename {src/stub => misc}/scripts/upx-clang-format (100%) diff --git a/.github/travis_build.sh b/.github/travis_build.sh index 2e63a97f..408a50b6 100644 --- a/.github/travis_build.sh +++ b/.github/travis_build.sh @@ -27,7 +27,7 @@ echo if [[ $TRAVIS_OS_NAME == linux ]]; then cd / && cd $upx_SRCDIR || exit 1 echo "Checking source code for whitespace violations..." - bash ./src/stub/scripts/check_whitespace.sh || exit 1 + bash ./misc/scripts/check_whitespace.sh || exit 1 echo " Passed." fi # linux diff --git a/src/stub/scripts/check_whitespace.sh b/misc/scripts/check_whitespace.sh similarity index 100% rename from src/stub/scripts/check_whitespace.sh rename to misc/scripts/check_whitespace.sh diff --git a/src/stub/scripts/check_whitespace_git.sh b/misc/scripts/check_whitespace_git.sh similarity index 97% rename from src/stub/scripts/check_whitespace_git.sh rename to misc/scripts/check_whitespace_git.sh index 92d1eea3..7ab20e93 100755 --- a/src/stub/scripts/check_whitespace_git.sh +++ b/misc/scripts/check_whitespace_git.sh @@ -10,7 +10,7 @@ set -e; set -o pipefail git ls-files --full-name -z | perl -0 -n -e ' s,^,./,; if (m,^\./src/lzma-sdk(\0|$),) { } - if (m,^\./vendor/,) { } + elsif (m,^\./vendor/,) { } elsif (m,\.bat(\0|$),) { } elsif (m,\.exe(\0|$),) { } else { print; } diff --git a/src/stub/scripts/upx-clang-format b/misc/scripts/upx-clang-format similarity index 100% rename from src/stub/scripts/upx-clang-format rename to misc/scripts/upx-clang-format diff --git a/src/Makefile b/src/Makefile index c742cb1e..20b8fb58 100644 --- a/src/Makefile +++ b/src/Makefile @@ -153,9 +153,9 @@ endif CHECK_WHITESPACE = ifeq ($(shell uname),Linux) -CHECK_WHITESPACE = $(top_srcdir)/src/stub/scripts/check_whitespace.sh $(top_srcdir) +CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace.sh $(top_srcdir) ifneq ($(wildcard $(top_srcdir)/.git/.),) -CHECK_WHITESPACE = $(top_srcdir)/src/stub/scripts/check_whitespace_git.sh $(top_srcdir) +CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace_git.sh $(top_srcdir) endif check-whitespace : ; $(CHECK_WHITESPACE) endif @@ -215,7 +215,7 @@ CLANG_FORMAT_FILES += s_djgpp2.cpp s_object.cpp s_vcsa.cpp s_win32.cpp screen.h CLANG_FORMAT_FILES += snprintf.cpp CLANG_FORMAT_FILES += ui.cpp ui.h util.cpp util.h work.cpp clang-format: - $(top_srcdir)/src/stub/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(sort $(CLANG_FORMAT_FILES))) + $(top_srcdir)/misc/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(sort $(CLANG_FORMAT_FILES))) .PHONY: clang-format endif