31 lines
971 B
Bash
31 lines
971 B
Bash
#!/bin/bash
|
|
if [ -d /home/deck/.keiran-sds ]; then
|
|
if zenity --question --no-wrap --no-wrap \
|
|
--text='Keiran Steam Deck Scripts is already installed. Re-install?'; then
|
|
rm -rf /home/deck/.keiran-sds
|
|
else
|
|
echo canceled
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
coproc zenity --progress --auto-close --title='Installing' --text='Git cloning...'
|
|
|
|
cd /home/deck
|
|
if ! git clone https://git.keiran.us/keiran/steamdeck-scripts.git .keiran-sds; then
|
|
echo 100 >&${COPROC[1]}
|
|
zenity --error --no-wrap --no-markup --text='failed to clone https://git.keiran.us/keiran/steamdeck-scripts'
|
|
exit 1
|
|
fi
|
|
|
|
echo 33 >&${COPROC[1]}
|
|
echo '#Setting up virtual environment...' >&${COPROC[1]}
|
|
python3 -m venv ~/.keiran-sds
|
|
/home/deck/.keiran-sds/bin/pip3 install --upgrade pip
|
|
cd /home/deck/.keiran-sds
|
|
|
|
echo 67 >&${COPROC[1]}
|
|
echo '#Installing dependencies...' >&${COPROC[1]}
|
|
/home/deck/.keiran-sds/bin/pip3 install -r requirements.txt
|
|
|
|
echo 100 >&${COPROC[1]} # Close Zenity |