Add automatic dependency installation to run.sh
This commit is contained in:
21
run.sh
21
run.sh
@@ -27,6 +27,27 @@ if command -v gtk-update-icon-cache &> /dev/null; then
|
|||||||
gtk-update-icon-cache -f -t "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
|
gtk-update-icon-cache -f -t "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check and install dependencies (Fedora/DNF)
|
||||||
|
if command -v dnf &> /dev/null; then
|
||||||
|
DEPENDENCIES="python3-gobject gtk4 libadwaita python3-requests gdisk dosfstools e2fsprogs"
|
||||||
|
MISSING_DEPS=""
|
||||||
|
|
||||||
|
for dep in $DEPENDENCIES; do
|
||||||
|
if ! rpm -q $dep &> /dev/null; then
|
||||||
|
MISSING_DEPS="$MISSING_DEPS $dep"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$MISSING_DEPS" ]; then
|
||||||
|
echo "Missing dependencies found:$MISSING_DEPS"
|
||||||
|
echo "Installing..."
|
||||||
|
sudo dnf install -y $MISSING_DEPS
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Warning: 'dnf' not found. Automatic dependency installation skipped."
|
||||||
|
echo "Please ensure you have: python3-gobject gtk4 libadwaita python3-requests gdisk dosfstools e2fsprogs"
|
||||||
|
fi
|
||||||
|
|
||||||
export GSETTINGS_SCHEMA_DIR=.
|
export GSETTINGS_SCHEMA_DIR=.
|
||||||
|
|
||||||
python3 -m iridium_installer.main "$@"
|
python3 -m iridium_installer.main "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user