i'm a dumb.

This commit is contained in:
brent s. 2015-07-17 07:04:19 -04:00
parent fc0a1ec94a
commit 4403901d8f
17 changed files with 149 additions and 45 deletions

View File

@ -120,9 +120,7 @@ source ${BASEDIR}/lib/03-release_me.func.sh
source ${BASEDIR}/lib/04-facehugger.func.sh source ${BASEDIR}/lib/04-facehugger.func.sh
source ${BASEDIR}/lib/05-chroot_wrapper.func.sh source ${BASEDIR}/lib/05-chroot_wrapper.func.sh
source ${BASEDIR}/lib/06-jenny_craig.func.sh source ${BASEDIR}/lib/06-jenny_craig.func.sh
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" || "${HOST_DIST}" == "SUSE" ]]; source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
fi
source ${BASEDIR}/lib/08-will_it_blend.func.sh source ${BASEDIR}/lib/08-will_it_blend.func.sh
source ${BASEDIR}/lib/09-stuffy.func.sh source ${BASEDIR}/lib/09-stuffy.func.sh
source ${BASEDIR}/lib/10-yo_dj.func.sh source ${BASEDIR}/lib/10-yo_dj.func.sh
@ -154,9 +152,7 @@ fi
if [[ ${1} == "update" ]]; if [[ ${1} == "update" ]];
then then
mentos mentos
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; centos_is_stupid
centos_is_stupid
fi
will_it_blend 32 will_it_blend 32
will_it_blend 64 will_it_blend 64
yo_dj yo_dj
@ -176,21 +172,15 @@ if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]];
then then
if [[ "${MULTIARCH}" == "y" ]]; if [[ "${MULTIARCH}" == "y" ]];
then then
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; centos_is_stupid
centos_is_stupid
fi
will_it_blend 64 will_it_blend 64
will_it_blend 32 will_it_blend 32
yo_dj any yo_dj any
else else
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; centos_is_stupid
centos_is_stupid
fi
will_it_blend 64 will_it_blend 64
yo_dj 64 yo_dj 64
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; centos_is_stupid
centos_is_stupid
fi
will_it_blend 32 will_it_blend 32
yo_dj 32 yo_dj 32
fi fi

View File

@ -41,33 +41,6 @@ function so_check_me_out {
exit 1 exit 1
fi fi


## TWEAKS GO HERE. ##
# stupid gentoo. good riddance.
set +e
if [[ "${HOST_DIST}" == "Gentoo" ]];
then
grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords
if [[ "${?}" != "0" ]];
then
echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords
fi
fi
set -e

# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
# to figuure out that if I enable the multilib repos, *I wat multilib gcc*. Fuck it. We'll just remove it first.
if [[ "${HOST_DIST}" == "Arch" || "${HOST_DIST}" == "Antergos" || "${HOST_DIST}" == "Manjaro" ]];
then
for pkg_override in gcc gcc-libs;
do
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
if [[ "${?}" == "0" ]];
then
pacman -R --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
done
fi

# So we've validated the distro. Here, check for packages and install if necessary. maybe use an array, but it'd be better to soft-fail if one of the packages is missing. # So we've validated the distro. Here, check for packages and install if necessary. maybe use an array, but it'd be better to soft-fail if one of the packages is missing.


DISTRO_DIR="${BASEDIR}/lib/prereqs/${HOST_DIST}" DISTRO_DIR="${BASEDIR}/lib/prereqs/${HOST_DIST}"
@ -77,6 +50,9 @@ function so_check_me_out {
# And once more, just to be safe. # And once more, just to be safe.
source ${META} source ${META}


## TWEAKS GET RUN HERE.
distro_specific_tweaks

if [[ "${PRE_RUN}" != 'none' ]]; if [[ "${PRE_RUN}" != 'none' ]];
then then
echo "Now updating your local package cache..." echo "Now updating your local package cache..."

View File

@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
PRE_RUN='pacman -Syyy' PRE_RUN='pacman -Syyy'
PKG_CHK='pacman -Q ${pkgname}' PKG_CHK='pacman -Q ${pkgname}'
URL='http://antergos.com/' URL='http://antergos.com/'

function distro_specific_tweaks {
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.

set +e
for pkg_override in gcc gcc-libs;
do
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
if [[ "${?}" == "0" ]];
then
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
done
set -e

}

View File

@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
PRE_RUN='pacman -Syyy' PRE_RUN='pacman -Syyy'
PKG_CHK='pacman -Q ${pkgname}' PKG_CHK='pacman -Q ${pkgname}'
URL='https://www.archlinux.org/' URL='https://www.archlinux.org/'

function distro_specific_tweaks {
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.

set +e
for pkg_override in gcc gcc-libs;
do
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
if [[ "${?}" == "0" ]];
then
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
done
set -e

}

View File

@ -5,5 +5,11 @@ PKG_MGR='yum -y install ${pkgname}'
PRE_RUN='none' PRE_RUN='none'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='http://centos.org/' URL='http://centos.org/'
# NOTE: we handle installing of squashfs-tools (maybe) and xorriso in centos_is_stupid function.
# because they *suck*. Seriously. I need to install tk just to install xorriso. I mean, what? function distro_specific_tweaks {
# NOTE: we handle installing of squashfs-tools (maybe) and xorriso in centos_is_stupid function.
# because they *suck*. Seriously. I need to install tk just to install xorriso. I mean, what?

echo "No tweaks found."

}

View File

@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}'
PRE_RUN='apt-get update' PRE_RUN='apt-get update'
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
URL='http://www.debian.org/' URL='http://www.debian.org/'

function distro_specific_tweaks {

echo "No tweaks found."

}

View File

@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
PRE_RUN='apt-get update' PRE_RUN='apt-get update'
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
URL='http://www.debian.org/' URL='http://www.debian.org/'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -5,3 +5,10 @@ PKG_MGR='dnf -y install ${pkgname}'
PRE_RUN='none' PRE_RUN='none'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='https://getfedora.org/' URL='https://getfedora.org/'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -5,3 +5,16 @@ PKG_MGR='emerge -q1Dn ${pkgname}'
PRE_RUN='emerge -q --sync' PRE_RUN='emerge -q --sync'
PKG_CHK='emerge -qp @installed 2>/dev/null | egrep -E "/${pkgname}-[0-9.]+"' PKG_CHK='emerge -qp @installed 2>/dev/null | egrep -E "/${pkgname}-[0-9.]+"'
URL='https://www.gentoo.org/' URL='https://www.gentoo.org/'

function distro_specific_tweaks {
# WHY IS THIS EVEN MASKED?!

set +e
grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords
if [[ "${?}" != "0" ]];
then
echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords
fi
set -e

}

View File

@ -5,3 +5,10 @@ PKG_MGR='urpmi --force ${pkgname}'
PRE_RUN='urpmi.update -a' PRE_RUN='urpmi.update -a'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='https://www.mageia.org/' URL='https://www.mageia.org/'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
PRE_RUN='pacman -Syyyu' PRE_RUN='pacman -Syyyu'
PKG_CHK='pacman -Q ${pkgname}' PKG_CHK='pacman -Q ${pkgname}'
URL='https://manjaro.org/' URL='https://manjaro.org/'

function distro_specific_tweaks {
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.

set +e
for pkg_override in gcc gcc-libs;
do
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
if [[ "${?}" == "0" ]];
then
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi
done
set -e

}

View File

@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}'
PRE_RUN='apt-get -y update' PRE_RUN='apt-get -y update'
PKG_CHK='dpkg-query -l ${pkgname}' PKG_CHK='dpkg-query -l ${pkgname}'
URL='http://www.linuxmint.com/' URL='http://www.linuxmint.com/'

function distro_specific_tweaks {

echo "No tweaks found."

}

View File

@ -6,3 +6,10 @@ PKG_MGR='yum -y install'
PRE_RUN='none' PRE_RUN='none'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux' URL='http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -6,4 +6,11 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}'
PRE_RUN='zypper refresh' PRE_RUN='zypper refresh'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='https://www.suse.com/' URL='https://www.suse.com/'
# See the centos_is_stupid function. we do some tweaks there since -devel pkgs require the SDK on SLES/SLED.
function distro_specific_tweaks {
# See the centos_is_stupid function. we do some tweaks there since -devel pkgs require the SDK on SLES/SLED.

echo "No tweaks found."

}


View File

@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
PRE_RUN='apt-get -y update' PRE_RUN='apt-get -y update'
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
URL='http://www.ubuntu.com/' URL='http://www.ubuntu.com/'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
PRE_RUN='apt-get -y update' PRE_RUN='apt-get -y update'
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
URL='https://elementary.io/' URL='https://elementary.io/'

function distro_specific_tweaks {

echo "No tweaks found."

}


View File

@ -6,3 +6,10 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}'
PRE_RUN='zypper refresh' PRE_RUN='zypper refresh'
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
URL='https://www.opensuse.org/' URL='https://www.opensuse.org/'

function distro_specific_tweaks {

echo "No tweaks found."

}