mirror of
https://github.com/pkgforge-community/git.citron-emu.org-Citron-Citron.git
synced 2026-03-22 17:46:10 -04:00
18 lines
423 B
Bash
Executable File
18 lines
423 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Define old and new strings
|
|
old="citron"
|
|
new="citron"
|
|
|
|
# Find and rename directories first
|
|
find . -depth -type d -name "*${old}*" | while read -r dir; do
|
|
newdir=$(echo "$dir" | sed "s/${old}/${new}/g")
|
|
mv "$dir" "$newdir"
|
|
done
|
|
|
|
# Find and rename files
|
|
find . -depth -type f -name "*${old}*" | while read -r file; do
|
|
newfile=$(echo "$file" | sed "s/${old}/${new}/g")
|
|
mv "$file" "$newfile"
|
|
done
|