- zpm extract $pkgfile $fhash $tmppath 0
- chown $owner:$group $tmppath
- chmod $mode $tmppath
- # TODO mv -n non-posix, going to need to have extract do all
- # of this
- mv -n $tmppath $dir/$name
+ umask 0700
+ case $ftype in
+ r*) zpm extract $pkgfile $fhash $tmppath
+ chown $owner:$group $tmppath
+ chmod $mode $tmppath
+ # TODO mv -n non-posix, going to need to have extract
+ # do all of this
+ mv $tmppath $dir/$name
+ ;;
+ d*)
+ mkdir -m 000 $dir/$name
+ chown $owner:$group $dir/$name
+ chmod $mode $dir/name
+ ;;
+
+ *) echo unknown filetype ; exit 1 ;;
+ esac
+