i'm a dumb.
This commit is contained in:
parent
fc0a1ec94a
commit
4403901d8f
10
bin/build.sh
10
bin/build.sh
@ -120,9 +120,7 @@ source ${BASEDIR}/lib/03-release_me.func.sh
|
||||
source ${BASEDIR}/lib/04-facehugger.func.sh
|
||||
source ${BASEDIR}/lib/05-chroot_wrapper.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
|
||||
fi
|
||||
source ${BASEDIR}/lib/08-will_it_blend.func.sh
|
||||
source ${BASEDIR}/lib/09-stuffy.func.sh
|
||||
source ${BASEDIR}/lib/10-yo_dj.func.sh
|
||||
@ -154,9 +152,7 @@ fi
|
||||
if [[ ${1} == "update" ]];
|
||||
then
|
||||
mentos
|
||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||
centos_is_stupid
|
||||
fi
|
||||
will_it_blend 32
|
||||
will_it_blend 64
|
||||
yo_dj
|
||||
@ -176,21 +172,15 @@ if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]];
|
||||
then
|
||||
if [[ "${MULTIARCH}" == "y" ]];
|
||||
then
|
||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||
centos_is_stupid
|
||||
fi
|
||||
will_it_blend 64
|
||||
will_it_blend 32
|
||||
yo_dj any
|
||||
else
|
||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||
centos_is_stupid
|
||||
fi
|
||||
will_it_blend 64
|
||||
yo_dj 64
|
||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||
centos_is_stupid
|
||||
fi
|
||||
will_it_blend 32
|
||||
yo_dj 32
|
||||
fi
|
||||
|
@ -41,33 +41,6 @@ function so_check_me_out {
|
||||
exit 1
|
||||
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.
|
||||
|
||||
DISTRO_DIR="${BASEDIR}/lib/prereqs/${HOST_DIST}"
|
||||
@ -77,6 +50,9 @@ function so_check_me_out {
|
||||
# And once more, just to be safe.
|
||||
source ${META}
|
||||
|
||||
## TWEAKS GET RUN HERE.
|
||||
distro_specific_tweaks
|
||||
|
||||
if [[ "${PRE_RUN}" != 'none' ]];
|
||||
then
|
||||
echo "Now updating your local package cache..."
|
||||
|
@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||
PRE_RUN='pacman -Syyy'
|
||||
PKG_CHK='pacman -Q ${pkgname}'
|
||||
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
|
||||
|
||||
}
|
||||
|
@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||
PRE_RUN='pacman -Syyy'
|
||||
PKG_CHK='pacman -Q ${pkgname}'
|
||||
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
|
||||
|
||||
}
|
||||
|
@ -5,5 +5,11 @@ PKG_MGR='yum -y install ${pkgname}'
|
||||
PRE_RUN='none'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='http://centos.org/'
|
||||
|
||||
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."
|
||||
|
||||
}
|
||||
|
@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}'
|
||||
PRE_RUN='apt-get update'
|
||||
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||
URL='http://www.debian.org/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
|
||||
PRE_RUN='apt-get update'
|
||||
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||
URL='http://www.debian.org/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,10 @@ PKG_MGR='dnf -y install ${pkgname}'
|
||||
PRE_RUN='none'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='https://getfedora.org/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,16 @@ PKG_MGR='emerge -q1Dn ${pkgname}'
|
||||
PRE_RUN='emerge -q --sync'
|
||||
PKG_CHK='emerge -qp @installed 2>/dev/null | egrep -E "/${pkgname}-[0-9.]+"'
|
||||
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
|
||||
|
||||
}
|
||||
|
@ -5,3 +5,10 @@ PKG_MGR='urpmi --force ${pkgname}'
|
||||
PRE_RUN='urpmi.update -a'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='https://www.mageia.org/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||
PRE_RUN='pacman -Syyyu'
|
||||
PKG_CHK='pacman -Q ${pkgname}'
|
||||
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
|
||||
|
||||
}
|
||||
|
@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}'
|
||||
PRE_RUN='apt-get -y update'
|
||||
PKG_CHK='dpkg-query -l ${pkgname}'
|
||||
URL='http://www.linuxmint.com/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
@ -6,3 +6,10 @@ PKG_MGR='yum -y install'
|
||||
PRE_RUN='none'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,4 +6,11 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}'
|
||||
PRE_RUN='zypper refresh'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='https://www.suse.com/'
|
||||
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
|
||||
PRE_RUN='apt-get -y update'
|
||||
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||
URL='http://www.ubuntu.com/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}'
|
||||
PRE_RUN='apt-get -y update'
|
||||
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||
URL='https://elementary.io/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,3 +6,10 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}'
|
||||
PRE_RUN='zypper refresh'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='https://www.opensuse.org/'
|
||||
|
||||
function distro_specific_tweaks {
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user