From 03baaa53496cee70cd459282f048c3c118ca715d Mon Sep 17 00:00:00 2001 From: Yigit Date: Sun, 21 Mar 2021 00:33:28 +0300 Subject: [PATCH] Install script --- arch-setup/arch-setup.sh | 21 +++++++++++++-------- scripts/daily-update | 14 +++++++------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/arch-setup/arch-setup.sh b/arch-setup/arch-setup.sh index 35132780..9c4b4630 100755 --- a/arch-setup/arch-setup.sh +++ b/arch-setup/arch-setup.sh @@ -6,15 +6,20 @@ read device echo "Installing to $device... (Enter to continue)" read _ -# Disk wipe -echo "[INFO]: Wiping disk" -cryptsetup open -q --type plain -d /dev/urandom $device wipe -dd if=/dev/zero of=/dev/mapper/wipe status=progress -cryptsetup -q close wipe -wipefs -a -f $device +echo -n "Would you wipe and re-partition the disk $device?(Y/n): " +read wipe -# Run cfdisk for manual partitioning -cfdisk $device +if [ ! "$wipe" = "n" ]; then + # Disk wipe + echo "[INFO]: Wiping disk" + cryptsetup open -q --type plain -d /dev/urandom $device wipe + dd if=/dev/zero of=/dev/mapper/wipe status=progress + cryptsetup -q close wipe + wipefs -a -f $device + + # Run cfdisk for manual partitioning + cfdisk $device +fi # Create the boot partition echo "[INFO]: Formatting boot partition" diff --git a/scripts/daily-update b/scripts/daily-update index ded1051e..2a4ec3bc 100755 --- a/scripts/daily-update +++ b/scripts/daily-update @@ -7,18 +7,18 @@ afternoon=19 cached=$(cat /tmp/day_cache) if [ $hour \< $morning ]; then - if [ ! "$cached" = "morning" ]; then - feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-mountain.jpg - echo "morning" > /tmp/day_cache + if [ ! "$cached" = "night" ]; then + feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-shack.jpg + echo "night" > /tmp/day_cache fi -elif [ $hour \< $afternoon ]; then +elif [ $hour \> $afternoon ]; then if [ ! "$cached" = "afternoon" ]; then feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-sea.jpg echo "afternoon" > /tmp/day_cache fi else - if [ ! "$cached" = "night" ]; then - feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-shack.jpg - echo "night" > /tmp/day_cache + if [ ! "$cached" = "morning" ]; then + feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-mountain.jpg + echo "morning" > /tmp/day_cache fi fi