#!/bin/bash

find tmp/install -type f -exec md5sum "{}" \; | 
                                            sed 's|tmp/install|'$1'|' > $2
find tmp/install -type l -exec printf "link %s\n" "{}" \; |
                                            sed 's|tmp/install|'$1'|' >> $2
find tmp/install -type d -exec printf "dir %s\n" "{}" \;  |
                                            sed 's|tmp/install|'$1'|' >> $2

