Skip to content

Commit

Permalink
feat: add script for renaming project, and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Jul 5, 2022
1 parent f65a600 commit f2bc14b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Template for CEUR Articles

## How to use

0. Create a repo using this template
1. `git clone --recursive YOUR_REPO_URL`
2. `cd YOUR_REPO_NAME`
3. `./rename-template.sh YOUR_REPO_NAME`
4. Commit & push
5. Write your paper
6. Recall to update the version commands in the `.tex` file
21 changes: 21 additions & 0 deletions rename-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!bash

CWD=`pwd`
DIR_NAME=${CWD##*/}

NEW_NAME=${1:-$DIR_NAME}

if [[ -z "$NEW_NAME" ]]; then
echo "Must provide a new name as argument" 1>&2
exit 1
fi

for EXT in tex sty bib; do
mv ceur-article-template.$EXT $NEW_NAME.$EXT
done

for FILE in `ls $NEW_NAME.{tex,sty,bib} .gitignore .github/workflows/*.yml`; do
sed -i '.bak' -e "s/ceur-article-template/$NEW_NAME/g" $FILE
done

rm *.bak .github/workflows/*.bak *.sh

0 comments on commit f2bc14b

Please sign in to comment.