-rw-r--r-- | scripts/cr-remove.sh | 12 | ||||
-rwxr-xr-x | scripts/saveall.sh | 12 | ||||
-rw-r--r-- | scripts/unix2dos.py | 19 |
diff --git a/scripts/cr-remove.sh b/scripts/cr-remove.sh index db984516..c331bb1c 100644 --- a/scripts/cr-remove.sh +++ b/scripts/cr-remove.sh @@ -1,6 +1,6 @@ -#!/bin/bash
-
-for NM in *.c; do
- NEO="$NM.copy"
- cat $NM | tr -d '015円' > "$NEO" && ( rm "$NM" && mv "$NEO" "$NM" )
-done
+#!/bin/bash + +for NM in *.c; do + NEO="$NM.copy" + cat $NM | tr -d '015円' > "$NEO" && ( rm "$NM" && mv "$NEO" "$NM" ) +done diff --git a/scripts/saveall.sh b/scripts/saveall.sh index 36d4eda5..347e0158 100755 --- a/scripts/saveall.sh +++ b/scripts/saveall.sh @@ -1,6 +1,6 @@ -#!/bin/bash
-
-find gsl-shell -not -regex '.*\.\(dll\|exe\|a\|o\)' -a -not -name '*~' -a -not -regex '.*\/\.\(deps\|svn\|libs\).*' > /c/temp/list.txt
-
-tar czvf /c/temp/1ドル /c/temp/list.txt
-
+#!/bin/bash + +find gsl-shell -not -regex '.*\.\(dll\|exe\|a\|o\)' -a -not -name '*~' -a -not -regex '.*\/\.\(deps\|svn\|libs\).*' > /c/temp/list.txt + +tar czvf /c/temp/1ドル /c/temp/list.txt + diff --git a/scripts/unix2dos.py b/scripts/unix2dos.py new file mode 100644 index 00000000..e7e822b6 --- /dev/null +++ b/scripts/unix2dos.py @@ -0,0 +1,19 @@ +import sys +import os + +for fn in sys.argv[1:]: + new_name = fn + ".new_" + + fin = open(fn, "rb") + fout = open(new_name, "wb") + + for line in fin: + nline = line.replace("\n", "015円\n") + fout.write(nline) + + fin.close() + fout.close() + + os.remove(fn) + os.rename(new_name, fn) + |