Skip to content
Snippets Groups Projects
Commit a2aef812 authored by Arkerthan's avatar Arkerthan
Browse files

Sanity check searches words now

parent 3b71e51b
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
#converts files in the current dir
# collect files with [script] tag
FILES=`grep '\[script\]' -H -R * | cut -f 1 -d ':'`
for f in $FILES; do
# create new name. Old name can have any of the following suffixes:
# _JS.tw JS.tw .tw
nf="${f%_JS.tw}"
nf="${nf%JS.tw}"
nf="${nf%.tw}"
# we might end up with an empty name, then set dir name as the file name
[ -z "$(basename $nf)" -o "${nf: -1}" = "/" ] && nf="${nf}$(basename ${nf})"
# append the new suffix
nf="${nf}.js"
echo "renaming ${f} -> ${nf}"
# rename the file
git mv "${f}" "${nf}" || echo "renaming ${f} failed"
# strip Twee header from it
sed -i 1d "${nf}" || echo "stripping Twee header failed for ${nf}"
# strip leading empty line '/./,$!d'
sed -i '/./,$!d' "${nf}" || echo "Stripping leading empty blank lines failed for ${nf}"
done
# Define phrases that should be searched in src/ on every call of the java based # Define phrases that should be searched in src/ on every call of the java based
# sanityCheck here. # sanityCheck here.
# Phrases will be found whenever that exact phrase appears, regardless of
# surroundings or overlapping.
# Format is: searchPhrase#errorMessage # Format is: searchPhrase#errorMessage
# Output is: Found searchPhrase; Error: errorMessage # Output is: Found searchPhrase; Error: errorMessage
cash +=#Should be cashX() cash +=#Should be cashX()
...@@ -28,3 +30,6 @@ fetishknown#fetishKnown ...@@ -28,3 +30,6 @@ fetishknown#fetishKnown
recieve#receive recieve#receive
recieves#receives recieves#receives
$slave[#Should be $slaves[ $slave[#Should be $slaves[
can not#cannot
Coca Cola#Coca-Cola
dosen't#doesn't
This diff is collapsed.
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment