Initial installer for testing
This commit is contained in:
parent
5fe9eecfee
commit
f1ebd18cf3
1 changed files with 48 additions and 0 deletions
48
OL35-installer.sh
Executable file
48
OL35-installer.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
USER_HOME="$HOME"
|
||||
MAMBA_DIR="$USER_HOME/micromamba"
|
||||
CONFIG_DIR="$USER_HOME/.config/OptimaLab35"
|
||||
DESKTOP_DIR="$USER_HOME/.local/share/applications"
|
||||
ICON_URL="https://code.boxyfoxy.net/CodeByMrFinchum/OptimaLab35-installer/raw/branch/feat/init/app-icon.png" # change to your actual repo URL
|
||||
ICON_PATH="$CONFIG_DIR/app-icon.png"
|
||||
|
||||
echo $USER_HOME
|
||||
exit
|
||||
echo "Checking for micromamba..."
|
||||
if [ ! -d "$MAMBA_DIR" ]; then
|
||||
echo "micromamba not found - installing..."
|
||||
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
|
||||
else
|
||||
echo "micromamba already installed."
|
||||
fi
|
||||
|
||||
echo "Creating micromamba environment 'ol' with OptimaLab35..."
|
||||
eval "$("$MAMBA_DIR"/bin/micromamba shell hook -s bash)"
|
||||
micromamba create -y -n ol pip OptimaLab35
|
||||
|
||||
echo "Creating config directory..."
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
|
||||
echo "Downloading icon..."
|
||||
curl -L "$ICON_URL" -o "$ICON_PATH"
|
||||
|
||||
echo "Creating desktop entry..."
|
||||
mkdir -p "$DESKTOP_DIR"
|
||||
|
||||
cat > "$DESKTOP_DIR/OptimaLab35.desktop" <<EOL
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=OptimaLab35
|
||||
Exec=bash -c 'eval "\$(\$HOME/micromamba/bin/micromamba shell hook -s bash)"; micromamba activate ol; OptimaLab35'
|
||||
Icon=$ICON_PATH
|
||||
Categories=Graphics;Photography;
|
||||
Terminal=false
|
||||
EOL
|
||||
|
||||
echo "Creating application shortcut. You may be prompted for your password to finalize permissions."
|
||||
chmod +x "$DESKTOP_DIR/OptimaLab35.desktop"
|
||||
|
||||
echo "Installation complete! You can now launch OptimaLab35 from your application menu."
|
||||
echo "Tip: You can update the application at any time from the Settings menu."
|
||||
Loading…
Add table
Add a link
Reference in a new issue