aboutsummaryrefslogtreecommitdiff
path: root/utils/01-migrate.sh
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.com>2021-11-20 00:08:54 +0200
committerkaotisk <kaotisk@arching-kaos.com>2021-11-20 00:08:54 +0200
commit4680df3e880be45c83a298002557fa6ac1b3a423 (patch)
tree9f15ca2f32e90730ad779ed49a9d16e1a18aa083 /utils/01-migrate.sh
parent7e57767f0c0355f808486111580be41c2f467a10 (diff)
download01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.tar.gz
01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.tar.bz2
01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.zip
Packing to latest changes
Diffstat (limited to 'utils/01-migrate.sh')
-rwxr-xr-xutils/01-migrate.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/01-migrate.sh b/utils/01-migrate.sh
new file mode 100755
index 0000000..8b6db20
--- /dev/null
+++ b/utils/01-migrate.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+echo "Migration tool: please run only once"
+FILES=$(ls -1 | grep 202)
+for file in $FILES; do
+ if [ -f $file ]
+ then
+ title="$(head -n 1 $file)"
+ new_name="$file-$(echo "$title" | tr '[:upper:]' '[:lower:]' | sed -e 's/ /\_/g')"
+ mv $file $new_name
+ git add $file $new_name
+ git commit -m "Migrated to new naming $file to $new_name";
+ fi
+done