Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Usage
- #Place this scprit in the wiki folder and run the following using your github :
- #bash bake_wiki.sh USER PASS
- for fullfile in *; do
- filename=$(basename "$fullfile")
- filename="${filename%.*}"
- echo $filename
- grip "$filename.md" --export export/"$filename.html" --user=$1 --pass=$2
- for fullfile2 in *; do
- filename2=$(basename "$fullfile2")
- filename2="${filename2%.*}"
- find="-"
- replace=" "
- filename_with_spaces=${filename2//$find/$replace}
- sed -i -e "s/\[\[$filename_with_spaces]]/<a href='$filename2.html'>$filename_with_spaces<\/a>/g" export/"$filename.html"
- done
- done
Add Comment
Please, Sign In to add comment