浏览代码

Add assert_vendor() sub-routine

Mark Naughton 2 年之前
父节点
当前提交
119cafd963
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      misc/remove_libraries_for_other_platforms.sh

+ 7 - 0
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
 		;;