install_ldadp() { # $1: directory to install server to local DIR="$1" [ -z "$DIR" ] && perror "Pass dir to install_ldadp!" echo "# Installing ldadp... " git clone --depth 1 git://git.openslx.org/openslx-ng/ldadp.git ldadptmp || perror "Could not clone ldadp repo" cd ldadptmp || perror "Could not cd to ldadptmp" make || perror "Could not compile ldadp" mkdir -p "$DIR" || perror "Could not create $DIR" cp ldadp "$DIR" || perror "Could not copy ldadp binary to $DIR" cd .. || perror "Could not cd .." rm -r ldadptmp # Should we care if fail? return 0 }