# HG changeset patch # User Changaco # Date 1334528873 -7200 # Node ID 70bf588021fa1f407a0dd273d3a25b00e3b615da # Parent 0d4378996672d5175b34646c309c8b4dee4fbb9e fix setup script Signed-off-by: Changaco diff --git a/setup b/setup --- a/setup +++ b/setup @@ -27,12 +27,12 @@ confdir="${DESTDIR}etc/$progname" if [ "$action" == install ]; then install -v -m 755 -D $progname "$_PREFIX/bin/$progname" install_dir examples "$_PREFIX/share/$progname" - [ -d /etc/rc.d ] && install_dir rc.d "${DESTDIR}etc" && mkdir -v "$confdir" + [ -d /etc/rc.d ] && install_dir rc.d "${DESTDIR}etc" && install -vd "$confdir" elif [ "$action" == uninstall ]; then remove "$_PREFIX/bin/$progname" remove "$_PREFIX/share/$progname/examples" remove "${DESTDIR}etc/rc.d/$progname" - if [ $(ls -a "$confdir") -eq 2 ]; then rmdir "$confdir" + if [ $(ls -a "$confdir" | wc -l) -eq 2 ]; then rmdir "$confdir" else echo "not removing config dir $confdir (not empty)" fi elif [ "$action" == update ]; then