diff options
| author | Mark Naughton <mark@marknaughton.com> | 2023-04-05 11:28:54 +0100 |
|---|---|---|
| committer | Mark Naughton <mark@marknaughton.com> | 2023-04-05 11:28:54 +0100 |
| commit | 119cafd963fc807466ca69c0464bf05a91471f88 (patch) | |
| tree | e79f4a7da494f830e62b26499c32931e6a4ba757 /misc | |
| parent | 5fc54ec7e57af02af38e6f979929d4542cadbfcf (diff) | |
Add assert_vendor() sub-routine
Diffstat (limited to 'misc')
| -rwxr-xr-x | misc/remove_libraries_for_other_platforms.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/remove_libraries_for_other_platforms.sh b/misc/remove_libraries_for_other_platforms.sh index 5a5286faf..b66deddb6 100755 --- a/misc/remove_libraries_for_other_platforms.sh +++ b/misc/remove_libraries_for_other_platforms.sh @@ -6,6 +6,12 @@ panic() { exit 1 } +assert_vendor() { + if [ $(basename $(pwd)) != 'vendor' ]; then + panic "Not in vendor directory!" + fi +} + remove_windows_libraries() { find . -type f -name '*.dll' | xargs rm -f find . -type f -name '*.lib' | xargs rm -f @@ -24,6 +30,7 @@ remove_linux_libraries() { case $OS in Linux) + assert_vendor remove_windows_libraries remove_macos_libraries ;; |