Skip to content

Commit

Permalink
v 0.0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
khvalera committed Jul 13, 2021
1 parent e70dac5 commit 6da9359
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
4 changes: 3 additions & 1 deletion install-partition.func
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ install_grub_uefi(){
STR_READ=`show_message UEFI_DIRECTORY_DOES_NOT_EXIST $DIR_CHROOT/boot/efi`
return 1
fi
install_pkg "grub efibootmgr" "y"
install_pkg "grub" "y"
install_pkg "efibootmgr" "y"

OK=0
while [ "${OK}" = 0 ] ; do
arch-chroot $DIR_CHROOT grub-install
Expand Down
6 changes: 3 additions & 3 deletions install-snuglinux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

CURRENT_VERSION=0.0.0
CURRENT_VERSION=0.0.22
INSTALL_PREFIX=/usr
PO_DIR=${INSTALL_PREFIX}/share/snuglinux

Expand Down Expand Up @@ -31,8 +31,6 @@ else
exit 1
fi

pacman -Sy

system_language

set_options $*
Expand All @@ -42,6 +40,8 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi

pacman -Sy

ping_server
if [ "$?" = 1 ]; then
exit 1;
Expand Down
41 changes: 20 additions & 21 deletions install-snuglinux.func
Original file line number Diff line number Diff line change
Expand Up @@ -224,21 +224,25 @@ installed_pkg() {
}

#=======================================
pacman_install_list() {
pacman_install() {
local LIST_PKG RESULT_STR

LIST_PKG="$1"
OPTION="$2"
# RESULT_STR='/usr/bin/arch-chroot $DIR_CHROOT pacman -S --noconfirm'
if [ $OPTION == "1" ]; then
RESULT_STR='yes "$YES_CHAR" | /usr/bin/arch-chroot $DIR_CHROOT pacman -S --noconfirm --needed'
else
RESULT_STR='yes | /usr/bin/arch-chroot $DIR_CHROOT pacman -S --needed'
fi
for i in ${LIST_PKG[@]} ; do
RESULT_STR="${RESULT_STR} ${i}"
done
echo "${RESULT_STR}"
expect -c '
# exp_internal 1
set timeout -1
spawn /usr/bin/arch-chroot '$DIR_CHROOT' pacman -S '$LIST_PKG'
expect {
"=1):" {
interact
exit
}
"*Y/n*" {
send "y\r"
exp_continue
}
}
expect eof'
}

#=======================================
Expand Down Expand Up @@ -268,14 +272,7 @@ install_pkg() {
AMSURE="y"
fi
if [ "${AMSURE}" = "y" ]; then
PACMAN_CMD=`pacman_install_list "${INSTALL_PKG}" "1"`
eval ${PACMAN_CMD}
if ! [ $? = 0 ]; then
PACMAN_CMD=`pacman_install_list "${INSTALL_PKG}" "2"`
eval ${PACMAN_CMD}
fi
# arch-chroot $DIR_CHROOT pacman -S --noconfirm "${INSTALL_PKG}"
# arch-chroot $DIR_CHROOT pacman -S "${INSTALL_PKG}"
pacman_install "${INSTALL_PKG}"
if [ $? = 0 ]; then
show_message SUCCESSFULLY_INSTALLED_PACKAGE "${INSTALL_PKG}"
INSTALL=1
Expand Down Expand Up @@ -909,7 +906,9 @@ checking_installed_packages(){

#=======================================
clean_install_files(){
rm $DIR_CHROOT/usr/bin/qemu-arm-static
if [[ "$INSTALL_ARCH" == "arm" ]] && [[ $(uname -m) == "x86_64" ]] ; then
rm $DIR_CHROOT/usr/bin/qemu-arm-static
fi
run_command_chroot "pacman -Scc --noconfirm"
}

Expand Down

0 comments on commit 6da9359

Please sign in to comment.