diff options
author | kaotisk <kaotisk@arching-kaos.com> | 2021-11-19 23:54:12 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.com> | 2021-11-19 23:54:12 +0200 |
commit | 7e57767f0c0355f808486111580be41c2f467a10 (patch) | |
tree | bef321c83cd49890f4d4526e1c409071030a5b5c | |
parent | ebfb2124a921b3ceb5d9594eb9b9f418bd11815e (diff) | |
download | 01-NEWS-7e57767f0c0355f808486111580be41c2f467a10.tar.gz 01-NEWS-7e57767f0c0355f808486111580be41c2f467a10.tar.bz2 01-NEWS-7e57767f0c0355f808486111580be41c2f467a10.zip |
New migration as applied
-rwxr-xr-x | bin/migrate_to_folder.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/migrate_to_folder.sh b/bin/migrate_to_folder.sh new file mode 100755 index 0000000..93e64f2 --- /dev/null +++ b/bin/migrate_to_folder.sh @@ -0,0 +1,19 @@ +#!/bin/bash +echo "Migration tool 2: please run only once" +echo "Moves your news to a news folder" +FILES=$(ls -1 | grep 202) +if [ -d news ] +then + echo "news directory exists"; +else + mkdir news; +fi +for file in $FILES; do + if [ -f $file ] + then + new_name="news/"$file + mv $file $new_name + git add $file $new_name + git commit -m "Moved $file to news folder"; + fi +done |