--- functions.newpkg 2010-12-03 13:39:47.813333346 +0100 +++ functions.newpkg.new 2010-12-03 13:37:57.689998103 +0100 @@ -14,6 +14,39 @@ } # }}} +# setpkginstall() {{{ +setpkginstall () { + if [ -z "$1" ]; then + die 1 "setpkginstall() requires an argument!" + fi + case "$1" in + /*) + PROTO_INSTALL="$1" + ;; + *) + PROTO_INSTALL="${PROTODIR}/$1" + ;; + esac +} +# }}} + +# add_action {{{ +add_action() { + ACTIONS=(${ACTIONS[@]} $1) +} +# }}} + +# add_copy {{{ +add_copy() { + local from="$1" + local to="$2" + if [[ ! -r $from ]]; then + warn "Can't read %s, cancelling copy!\n" "$from" + fi + COPIES[$to]="$from" +} +# }}} + # add_mod() {{{ add_mod() { local mod="$1"