diff options
author | Silvino Silva <silvino@bk.ru> | 2018-02-25 17:33:12 +0000 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2018-02-25 17:33:12 +0000 |
commit | ef1f1f61daaf59d3e07d41ddd0ea713834f35e38 (patch) | |
tree | 5a34c6b419adc87a7887db8d2e6d25119e5434c3 /core/scripts/install-core.sh | |
parent | 080558ffff535c438d6244ff17a5d106622c754e (diff) | |
download | doc-ef1f1f61daaf59d3e07d41ddd0ea713834f35e38.tar.gz |
core install revision
Diffstat (limited to 'core/scripts/install-core.sh')
-rw-r--r-- | core/scripts/install-core.sh | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/core/scripts/install-core.sh b/core/scripts/install-core.sh new file mode 100644 index 0000000..8e61448 --- /dev/null +++ b/core/scripts/install-core.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +CHROOT="/mnt" +PORT_PKG="${CHROOT}/media/crux" + +#echo "1.1.8. Install Handbook\n" +#cp ${PORT_PKG}/handbook.txt $CHROOT/root/ + +ConfirmOrExit() +{ + while true + do + echo -n "Please confirm (y or n) :" + read CONFIRM + case $CONFIRM in + y|Y|YES|yes|Yes) break ;; + n|N|no|NO|No) + echo "Aborting - you entered $CONFIRM" + exit + ;; + *) echo "Please enter only y or n" + esac + done + echo "You entered $CONFIRM. Continuing ..." +} + + +install_core() { + + mkdir -p ${CHROOT}/var/lib/pkg + touch ${CHROOT}/var/lib/pkg/db + + CORE_LS="${DATA_DIR}/core.pkg" + + if [ ! -f ${CORE_LS} ]; then + CORE_LS=${CHROOT}/core.pkg + echo "1.1.4 Create core.pkg and install pkgadd" + for p in ${PORT_PKG}/core/*; + do + echo $(basename $p) >> ${CORE_LS}; + done + fi + + tar xf "${PORT_PKG}/core/pkgutils#5.40-1.pkg.tar.xz" usr/bin/pkgadd -O > ${CHROOT}/pkgadd + + chmod +x ${CHROOT}/pkgadd + + echo "1.1.4 File core.pkg complete, review list of packages before continue..." + read PAUSE + vim ${CORE_LS} + + echo "1.1.4 Starting install" + + #cd $CHROOT + while read line; do + pkg=${PORT_PKG}/core/${line} + echo "Installing ${pkg};\n" + ${CHROOT}/pkgadd -f -r ${CHROOT} ${pkg} + done < ${CORE_LS} + + rm ${CHROOT}/pkgadd + + if [ -f ${CHROOT}/core.pkg ]; then + rm ${CHROOT}/core.pkg; + fi +} + +install_packages() { + echo "Installing $CHROOT/media/crux/opt/fakeroot" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/fakeroot#* + echo "Installing $CHROOT/media/crux/opt/dbus" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/dbus#* + echo "Installing $CHROOT/media/crux/opt/expat" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/expat#* + echo "Installing $CHROOT/media/crux/opt/libnl" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libnl#* + echo "Installing $CHROOT/media/crux/opt/libpng" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libpng#* + echo "Installing $CHROOT/media/crux/opt/freetype" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/freetype#* + echo "Installing $CHROOT/media/crux/opt/libffi" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libffi#* + echo "Installing $CHROOT/media/crux/opt/sqlite3" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/sqlite3#* + echo "Installing $CHROOT/media/crux/opt/python" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/python#* + echo "Installing $CHROOT/media/crux/opt/glib" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/glib#* + echo "Installing $CHROOT/media/crux/opt/grub2" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/grub2#* + echo "Installing $CHROOT/media/crux/opt/grub2-efi" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/grub2-efi#* + echo "Installing $CHROOT/media/crux/opt/wireless-tools" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/wireless-tools#* + echo "Installing $CHROOT/media/crux/opt/wpa_supplicant" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/wpa_supplicant#* + echo "Installing $CHROOT/media/crux/opt/lvm2" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/lvm2#* + echo "Installing $CHROOT/media/crux/opt/mdadm" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/mdadm#* + echo "Installing $CHROOT/media/crux/opt/efivar" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/efivar#* + echo "Installing $CHROOT/media/crux/opt/efibootmgr" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/efibootmgr#* + echo "Installing $CHROOT/media/crux/opt/dosfstools" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/dosfstools#* + echo "Installing $CHROOT/media/crux/opt/parted" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/parted#* + echo "Installing $CHROOT/media/crux/opt/libgcrypt" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libgcrypt#* + echo "Installing $CHROOT/media/crux/opt/cryptsetup" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/cryptsetup#* + echo "Installing $CHROOT/media/crux/opt/popt" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/popt#* + echo "Installing $CHROOT/media/crux/opt/libgpg-error" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libgpg-error#* + echo "Installing $CHROOT/media/crux/opt/libevent" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libevent#* + echo "Installing $CHROOT/media/crux/opt/libtirpc" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libtirpc#* + echo "Installing $CHROOT/media/crux/opt/git" + $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/git#* + +} + +echo "PORT_PKG=${PORT_PKG}"; +echo "CHROOT=$CHROOT"; + +ConfirmOrExit +install_core +install_packages |