diff options
| author | tradam <git.tradam.fyi> | 2021-08-21 02:37:58 -0400 |
|---|---|---|
| committer | tradam <git.tradam.fyi> | 2021-08-21 02:37:58 -0400 |
| commit | dbcb42e5380183a6922d6df5d60c2e0e42083325 (patch) | |
| tree | ed99e18c03bd451f4fb647149a5dba3372837b15 | |
| download | mdbooks-scripts-dbcb42e5380183a6922d6df5d60c2e0e42083325.tar.gz mdbooks-scripts-dbcb42e5380183a6922d6df5d60c2e0e42083325.zip | |
.
| -rw-r--r-- | README.mdown | 13 | ||||
| -rwxr-xr-x | move.sh | 3 | ||||
| -rwxr-xr-x | rename.sh | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/README.mdown b/README.mdown new file mode 100644 index 0000000..a526fc3 --- /dev/null +++ b/README.mdown @@ -0,0 +1,13 @@ +# Scripts for MDBooks + +These scripts are for helping with creating and editing MDBooks + +--- + +### move.sh +`params: Name NewUrl` +This is for when you want to move a file. It will rename all the Urls to the new one you give, it matches to the name you give. + +### rename.sh +`params: NewName Url` +This is for when you want to rename something to a new one. It will rename all instances with the new one you give, it matches to the url you give. @@ -0,0 +1,3 @@ +#!/bin/bash + +find ./src -type f -exec sed -i 's/\['"$1"'](.*)/['"$1"']('"$2"')/g' {} \; diff --git a/rename.sh b/rename.sh new file mode 100755 index 0000000..4b2efc0 --- /dev/null +++ b/rename.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +find ./src -type f -exec sed -i 's/\[.*]('"$2"')/['"$1"']('"$2"')/g' {} \; |
