Browse Source

Install script

main
Yigit 4 years ago
parent
commit
03baaa5349
2 changed files with 20 additions and 15 deletions
  1. +13
    -8
      arch-setup/arch-setup.sh
  2. +7
    -7
      scripts/daily-update

+ 13
- 8
arch-setup/arch-setup.sh View File

@ -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"


+ 7
- 7
scripts/daily-update View File

@ -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

Loading…
Cancel
Save