Skip to content

Commit

Permalink
The first steps of a deploy script
Browse files Browse the repository at this point in the history
Toward #1.
  • Loading branch information
waldoj committed Mar 8, 2021
1 parent 521bc36 commit 747bfba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

cd cooperatives || exit

# Generate TSV of every project and their URL slugs
echo -e "URL\ttitle" | tee /tmp/projects.csv >/dev/null
grep -E "^# " ./*.md |sed 's/.md:#/\t/' >> /tmp/projects.csv

# Generate TSV of every project's URL slug and their states
echo -e "URL\tstates" | tee /tmp/states.csv >/dev/null
grep -E "\| states" ./*.md |sed 's/\.md:|[[:blank:]]*states[[:blank:]]*\|[[:blank:]]*/\t/' >> /tmp/states.csv

cd ..

0 comments on commit 747bfba

Please sign in to comment.