Merge pull request #60 from Nick-Shadow/main

Adds $SCRIPTHOME var, replacing hardcoded file paths
This commit is contained in:
Chris Titus 2021-11-08 09:36:23 -06:00 committed by GitHub
commit 3f31c8ad52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 70 additions and 34 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
install.conf
installlog.txt
installlog.txt
archnikus.code-workspace

View File

@ -106,17 +106,15 @@ echo "--------------------------------------"
pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed
genfstab -U /mnt >> /mnt/etc/fstab
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf
echo "--------------------------------------"
echo "-- GRUB Bootloader Installation --"
echo "--------------------------------------"
if [[ ! -d "/sys/firmware/efi" ]]; then
grub-install --boot-directory=/mnt/boot ${DISK}
else
grub-install --efi-directory=/mnt/boot ${DISK}
fi
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
echo "--------------------------------------"
echo "--GRUB BIOS Bootloader Install&Check--"
echo "--------------------------------------"
if [[ ! -d "/sys/firmware/efi" ]]; then
grub-install --boot-directory=/boot ${DISK}
fi
echo "--------------------------------------"
echo "-- Check for low memory systems <8G --"
echo "--------------------------------------"
TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
@ -133,5 +131,5 @@ if [[ $TOTALMEM -lt 8000000 ]]; then
echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab #Add swap to fstab, so it KEEPS working after installation.
fi
echo "--------------------------------------"
echo "-- SYSTEM READY FOR 0-setup --"
echo "-- SYSTEM READY FOR 1-setup --"
echo "--------------------------------------"

View File

@ -25,9 +25,9 @@ echo "-------------------------------------------------"
echo "Changing the makeflags for "$nc" cores."
TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
if [[ $TOTALMEM -gt 8000000 ]]; then
sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$nc"/g' /etc/makepkg.conf
sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf
echo "Changing the compression settings for "$nc" cores."
sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g' /etc/makepkg.conf
sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf
fi
echo "-------------------------------------------------"
echo " Setup Language to US and set locale "
@ -96,7 +96,7 @@ PKGS=(
'egl-wayland'
'exfat-utils'
'extra-cmake-modules'
'filelite'
'filelight'
'flex'
'fuse2'
'fuse3'
@ -236,14 +236,14 @@ fi
echo -e "\nDone!\n"
if ! source install.conf; then
read -p "Please enter username:" username
echo "username=$username" >> ${HOME}/ArchTitus/install.conf
echo "username=$username" >> ${HOME}/$SCRIPTHOME/install.conf
fi
if [ $(whoami) = "root" ];
then
useradd -m -G wheel,libvirt -s /bin/bash $username
passwd $username
cp -R /root/ArchTitus /home/$username/
chown -R $username: /home/$username/ArchTitus
cp -R /root/$SCRIPTHOME /home/$username/
chown -R $username: /home/$username/$SCRIPTHOME
read -p "Please name your machine:" nameofmachine
echo $nameofmachine > /etc/hostname
else

View File

@ -56,9 +56,9 @@ for PKG in "${PKGS[@]}"; do
done
export PATH=$PATH:~/.local/bin
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/
cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/
pip install konsave
konsave -i $HOME/ArchTitus/kde.knsv
konsave -i $HOME/$SCRIPTHOME/kde.knsv
sleep 1
konsave -a kde

View File

@ -9,7 +9,12 @@
#-------------------------------------------------------------------------
echo -e "\nFINAL SETUP AND CONFIGURATION"
echo "--------------------------------------"
echo "-- GRUB EFI Bootloader Install&Check--"
echo "--------------------------------------"
if [[ -d "/sys/firmware/efi" ]]; then
grub-install --efi-directory=/boot ${DISK}
fi
grub-mkconfig -o /boot/grub/grub.cfg
# ------------------------------------------------------------------------
@ -45,8 +50,3 @@ sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
# Replace in the same state
cd $pwd
echo "
###############################################################################
# Done - Please Eject Install Media and Reboot
###############################################################################
"

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Chris Titus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -31,9 +31,15 @@ __[Arch Linux Installation Guide](https://github.com/rickellis/Arch-Linux-Instal
### No Wifi
```bash
sudo wifi-menu
```
#1: Run `iwctl`
#2: Run `device list`, and find your device name.
#3: Run `station [device name] scan`
#4: Run `station [device name] get-networks`
#5: Find your network, and run `station [device name] connect [network name]`, enter your password and run `exit`. You can test if you have internet connection by running `ping google.com`.
## Credits

View File

@ -1,7 +1,17 @@
#!/bin/bash
# Find the name of the folder the scripts are in
export SCRIPTHOME="$(basename -- $PWD)"
echo "Scripts are in dir named $SCRIPTHOME"
bash 0-preinstall.sh
arch-chroot /mnt /root/ArchTitus/1-setup.sh
source /mnt/root/ArchTitus/install.conf
arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/ArchTitus/2-user.sh
arch-chroot /mnt /root/ArchTitus/3-post-setup.sh
arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh
source /mnt/root/$SCRIPTHOME/install.conf
arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh
arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh
echo "
###############################################################################
# Done - Please Eject Install Media and Reboot
###############################################################################
"

View File

@ -1,5 +1,5 @@
#!/bin/bash
cp -r $HOME/.config/kitty $HOME/ArchTitus/dotfiles/kitty
cp -r $HOME/.config/kitty $HOME/$SCRIPTHOME/dotfiles/kitty
konsave -s kde
konsave -e kde

View File

@ -1,8 +1,8 @@
#!/bin/bash
export PATH=$PATH:~/.local/bin
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/
cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/
pip install konsave
konsave -i $HOME/ArchTitus/kde.knsv
konsave -i $HOME/$SCRIPTHOME/kde.knsv
sleep 1
konsave -a kde