[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:16:25 UTC 2010
The following commit has been merged in the master branch:
commit 4b289562132b4311a6876913b0a3b1c5105e0bb2
Author: John Goerzen <jgoerzen at complete.org>
Date: Sun Dec 3 06:38:55 2006 +0100
Added renaming script
diff --git a/renameit.sh b/renameit.sh
new file mode 100644
index 0000000..80c0fc0
--- /dev/null
+++ b/renameit.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+OLDNAME="$1"
+NEWNAME="$2"
+
+mod2fn () {
+ echo -n "$1" | sed 's,\.,/,g'
+ echo ".hs"
+}
+
+mod2destdir () {
+ dirname "src/`mod2fn "$1"`"
+}
+
+OLDFN=$(mod2fn "${OLDNAME}")
+NEWFN=$(mod2fn "${NEWNAME}")
+NEWDIR=$(mod2destdir "${NEWNAME}")
+echo "Old module name: ${OLDNAME}"
+echo "New module name: ${NEWNAME}"
+echo "Old module file: ${OLDFN}"
+echo "New module file: ${NEWFN}"
+echo "New module dir: ${NEWDIR}"
+
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list