fix newline stripping
This commit is contained in:
parent
f42459fb18
commit
c223e88d33
1 changed files with 3 additions and 2 deletions
|
@ -13,8 +13,9 @@ There's probably a 1:1 mapping between this special md5 encoding an a regular md
|
||||||
<pre>
|
<pre>
|
||||||
import Locations
|
import Locations
|
||||||
import Types.Key
|
import Types.Key
|
||||||
|
import Utility.Misc
|
||||||
|
|
||||||
main = interact $ \s -> case file2key s of
|
main = interact $ \s -> case file2key $ firstLine s of
|
||||||
Nothing -> \"bad key\"
|
Nothing -> \"bad key\"
|
||||||
Just k -> hashDirMixed k ++ \" \" ++ hashDirLower k ++ \"\n\"
|
Just k -> hashDirMixed k ++ \" \" ++ hashDirLower k ++ \"\n\"
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -22,6 +23,6 @@ main = interact $ \s -> case file2key s of
|
||||||
<pre>
|
<pre>
|
||||||
joey@gnu:~/src/git-annex>ghc --make convert.hs
|
joey@gnu:~/src/git-annex>ghc --make convert.hs
|
||||||
joey@gnu:~/src/git-annex>echo WORM--foo | ./ convert
|
joey@gnu:~/src/git-annex>echo WORM--foo | ./ convert
|
||||||
gw/Vx/ 91d/46e/
|
jq/8w/ 2b1/ba3/
|
||||||
</pre>
|
</pre>
|
||||||
"""]]
|
"""]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue