mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-12 20:31:17 +08:00
26 lines
620 B
Bash
26 lines
620 B
Bash
#!/bin/bash
|
|
|
|
FILENAMES=$(ls)
|
|
for FILENAME in $FILENAMES
|
|
do
|
|
if [[ ! ($FILENAME =~ ".exe" || $FILENAME =~ ".sh")]];then
|
|
gzip -S ".gz" $FILENAME
|
|
elif [[ $FILENAME =~ ".exe" ]];then
|
|
zip -m ${FILENAME%.*}.zip $FILENAME
|
|
else echo "skip $FILENAME"
|
|
fi
|
|
done
|
|
|
|
FILENAMES=$(ls)
|
|
for FILENAME in $FILENAMES
|
|
do
|
|
if [[ $FILENAME =~ ".zip" ]];then
|
|
echo "rename $FILENAME"
|
|
mv $FILENAME ${FILENAME%.*}-${VERSION}.zip
|
|
elif [[ $FILENAME =~ ".gz" ]];then
|
|
echo "rename $FILENAME"
|
|
mv $FILENAME ${FILENAME%.*}-${VERSION}.gz
|
|
else
|
|
echo "skip $FILENAME"
|
|
fi
|
|
done |