-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 增加插件通用lib目录,增加maven构建时移除jar文件的功能
- Loading branch information
Showing
6 changed files
with
98 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
echo 'Remove duplicated jar files...' | ||
|
||
# 获取第一个目录下的所有文件 | ||
dir1=$1 | ||
array1=($(find $dir1 -type f)) | ||
|
||
# 获取第二个目录下的所有文件 | ||
dir2=$2 | ||
array2=($(find $dir2 -type f)) | ||
|
||
# 遍历两个数组,检查是否存在重复的文件 | ||
for file in "${array1[@]}"; do | ||
for otherfile in "${array2[@]}"; do | ||
if [[ $(basename "$file") == $(basename "$otherfile") ]]; then | ||
# 删除重复的文件 | ||
rm -f "$otherfile" | ||
break; | ||
fi | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters