Update export_src.sh

This commit is contained in:
rpelmegov 2023-02-27 05:52:11 +03:00 committed by GitHub
parent 4b5ee64737
commit 302530f3c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 12 deletions

View File

@ -46,18 +46,10 @@ done
find . -name ".git*" -print0 | xargs -0 rm -rf
zip -r -q ${SRC_FOLDER_NAME}.zip .
read_err_path() {
read -d $'\0' err_path
}
find . -name "*[<>:\\|?*]*" -print0 |
if read_err_path; then
echo "Export aborted! Invalid characters found in file or directories name(s):\n- $err_path"
while read_err_path
do
echo "- $err_path"
done
exit
ERR_PATHS=$(find . -name "*[<>:\\|?*]*" | xargs -I %s echo "- %s")
if [ "$ERR_PATHS" ]; then
echo "Export aborted! Invalid characters found in file or directories name(s):\n$ERR_PATHS"
exit 1
fi
open .