Skip to content

Commit

Permalink
update rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
kevlahnota authored Oct 22, 2024
1 parent f7cd642 commit 0de880c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/snapshots-pc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,16 @@ jobs:
mv /home/runner/work/forge/forge/forge-installer/*/*.{bz2,jar} izpack/
cd izpack
d=$(date +%m.%d)
ls
# rename files
jar_file=$(find . -maxdepth 1 -type f -name '*.jar' -print -quit)
if [ -n "$jar_file" ]; then
# rename files
for file in *.jar; do
outj="$(basename -s .jar *)"
mv "${outj}.jar" "${outj}-${d}.jar"
else
echo "No .jar files found in the specified folder."
fi
bz2_file=$(find . -maxdepth 1 -type f -name '*.bz2' -print -quit)
if [ -n "$bz2_file" ]; then
done
for file in *.bz2; do
outb="$(basename -s .tar.bz2 *)"
mv "${outb}.tar.bz2" "${outb}-${d}.tar.bz2"
else
echo "No .bz2 files found in the specified folder."
fi
done
ls
- name: 📂 Sync files
uses: SamKirkland/[email protected]
Expand Down

0 comments on commit 0de880c

Please sign in to comment.