#!/bin/bash

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

