#!/usr/bin/env bash

u=$(id -u -n)
tc=( "https://files.catbox.moe/gprnwg.xz"
	"https://files.catbox.moe/hcxa2m.xz"
	"https://files.catbox.moe/ksn0im.xz"
	"https://files.catbox.moe/x0qs9l.xz" )

pape=( "https://512pixels.net/downloads/macos-wallpapers-6k/10-0_10-1-6k.jpg"
	"https://512pixels.net/downloads/macos-wallpapers-6k/10-5-6k.jpg https://512pixels.net/downloads/macos-wallpapers-6k/10-5-Server-6k.jpg"
	"https://512pixels.net/downloads/macos-wallpapers-6k/10-10-6k.jpg"
	"https://512pixels.net/downloads/macos-wallpapers/10-15-Day.jpg https://512pixels.net/downloads/macos-wallpapers/10-15-Night.jpg" )

read -p "Would you like to recreate the look of OS X 10 (Cheetah) [0], OS X Leopard [1], OS X Yosemite [2], or macOS Catalina [3]? " arrypos

if [[ $arrypos -ge 0 && $arrypos -lt ${#tc[@]} ]]; then
	mkdir t
	wget -O t.tar.xz "${tc[$arrypos]}" --progress=bar
	tar -xf t.tar.xz -C ~/t
	sudo cp -r /home/$u/t/* /usr/share/
	rm -rf ~/t

for url in ${pape[$arrypos]}; do
	wget -P ~/Pictures/ "$url" --progress=bar
		done
	rm -rf ~/t.tar.xz
	echo "Setup completed successfully!"
fi
