Cdebootstrap (Application)
Jump to navigation
Jump to search
Install
# shared/opt install schema v1.5.6 #### as common user #### # define applications vars export SOFTWARE_PATH="/home/shared/opt/software" export NAME="cdebootstrap" export VERSION="0.7.8+b24_amd64" export URL="http://ftp.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_${VERSION}.deb" su - -w SOFTWARE_PATH,NAME,VERSION #### as root #### # install packages and prepare destination path apt-get -q -y install wget coreutils findutils < /dev/null apt-get -q -y install tar xz-utils binutils < /dev/null mkdir -m 777 -p "${SOFTWARE_PATH}/tmp_install/" "${SOFTWARE_PATH}/${NAME}_${VERSION}/" exit #### as common user #### umask 0027 cd "${SOFTWARE_PATH}/tmp_install" wget -c --no-check-certificate "${URL}" ar -x "cdebootstrap-static_${VERSION}.deb" mkdir ${SOFTWARE_PATH}/${NAME}_${VERSION}/tmp tar --no-overwrite-dir -xmJf data.tar.xz -C "${SOFTWARE_PATH}/${NAME}_${VERSION}/tmp" mv "${SOFTWARE_PATH}/${NAME}_${VERSION}/tmp/"* "${SOFTWARE_PATH}/${NAME}_${VERSION}/" rmdir "${SOFTWARE_PATH}/${NAME}_${VERSION}/tmp" cd su - -w SOFTWARE_PATH,NAME,VERSION #### as root #### # ensure permissions to destination path cd "${SOFTWARE_PATH}" chown -R root:users "${NAME}_${VERSION}" find "${NAME}_${VERSION}" -type d -exec chmod a-s,u+rwx,g+rx,g-w,o-rwx {} \; find "${NAME}_${VERSION}" -type f -exec chmod a-s,u+rw,g+r,g-w,o-rwx {} \; rm -rf tmp_install ln -s -f -T "${NAME}_${VERSION}" "${NAME}" exit #### as common user #### # test the application "${SOFTWARE_PATH}/${NAME}/usr/bin/cdebootstrap-static" --version