Add install script for yomininja

This commit is contained in:
Nikita Hasert committed 2025-05-25 10:41:31 +02:00
1 parent 0b67b3a9dd
commit 6dea5d5f98
3 files changed
+49 -31

No files matched your search

-25
View File
@@ -1,25 +0,0 @@
#!/bin/bash
# See: https://github.com/mathewthe2/Game2Text
function make_game2text {
# The requirements may need to be slightly adjusted if e.g. the specific version of numpy is not available
# TODO: Replace == with >= in requirements.py automatically
# TODO: In config.ini replace `browser = default` with `browser = chromium` automatically
# See: https://game2text.com/faq/switch-browser/
pip install -r requirements.txt
}
sudo steamos-readonly disable && \
sudo pacman base-devel glibc linux-api-headers zlib cmake python3 gcc nodejs npm libffi openssl rust tk tcl && \
sudo steamos-readonly enable && \
git clone https://github.com/mathewthe2/Game2Text.git && \
cd Game2Text && \
virtualenv venv --python='/usr/bin/python' && \
source venv/bin/activate && \
pip install virtualenv && \
make_game2text && \
deactivate
# TODO: Create a script for this and put it on the path
echo 'Run "source venv/bin/activate && python game2text.py ; deactivate" to start game2text'
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
function yes_or_no {
while true; do
read -p "$* [y/n]: " yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*) return 1 ;;
esac
done
}
function install_yomininja {
ymn="${HOME}/bin/yomininja"
if [ -e ${ymn} ]; then
yes_or_no "yomininja is already installed, do you want to overwrite the existing installation?"
fi
if [ $? -ne 0 ]; then
echo "Aborting install of yomininja."
return 0
fi
version=${1}
echo "Installing yomininja ${version}..."
ymnurl="https://github.com/matt-m-o/YomiNinja/releases/download/v${version}/YomiNinja-${version}.AppImage"
mkdir -p "$(dirname "$ymn")"
if [ -e ${ymn} ]; then
rm "$ymn"
fi
curl -fL "$ymnurl" -o "$ymn"
chmod u+x "$ymn"
}
install_yomininja ${1}