X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=geeqie-install-debian.sh;h=30997a9eb6261e98051f167479a856fd4b9579c1;hp=06ef8b4259b19dd1c1519530e1fb9880ad98ff64;hb=refs%2Fheads%2Fmaster;hpb=e68b6b1bf98f6d03a88f05326e02c060364f5768 diff --git a/geeqie-install-debian.sh b/geeqie-install-debian.sh index 06ef8b42..88fde4da 100755 --- a/geeqie-install-debian.sh +++ b/geeqie-install-debian.sh @@ -8,7 +8,7 @@ ## Dialogs allow the user to install additional features. ## -version="2022-07-21" +version="2024-01-22" description=' Geeqie is an image viewer. This script will download, compile, and install Geeqie on Debian-based systems. @@ -29,9 +29,9 @@ Command line options are: essential_array="git build-essential libglib2.0-0 -intltool libtool meson +ninja-build yelp-tools help2man doclifter" @@ -44,7 +44,7 @@ libgexiv2-dev evince (for print preview) evince lua (for --remote commands) -liblua5.1-0-dev +liblua5.3-dev libffmpegthumbnailer (for mpeg thumbnails) libffmpegthumbnailer-dev libtiff (for tiff support) @@ -90,7 +90,9 @@ libchamplain-gtk-0.12-dev libchamplain (for GPS maps) libchamplain-0.12-dev libpoppler (for pdf file preview) -libpoppler-glib-dev" +libpoppler-glib-dev +libjxl (for viewing .jxl images) +libjxl-dev" #################################################################### # Get System Info @@ -156,8 +158,8 @@ systemProfile() then DIST="${DIST}[$(tr "\n" ' ' < /etc/UnitedLinux-release | sed s/VERSION.*//)]" fi - OS=$(lowercase $OS) - DistroBasedOn=$(lowercase $DistroBasedOn) + OS=$(lowercase "$OS") + DistroBasedOn=$(lowercase "$DistroBasedOn") readonly OS readonly DIST readonly DistroBasedOn @@ -171,19 +173,12 @@ systemProfile() install_essential() { - i=0 - for file in $essential_array do - if [ $((i % 2)) -ne 0 ] + if package_query "$file" then - if package_query "$file" - then - package_install "$file" - fi + package_install "$file" fi - - i=$((i + 1)) done if [ "$1" = "GTK3" ] @@ -251,7 +246,7 @@ package_query() status=0 fi fi - return $status + return "$status" } package_install() @@ -350,7 +345,7 @@ do esac done -if [ "$LIST" ] +if [ -n "$LIST" ] then printf '%b\n' "Essential libraries:" for file in $essential_array @@ -424,12 +419,11 @@ then exit 1 fi" > "$install_pass_script" chmod +x "$install_pass_script" -export SUDO_ASKPASS=$install_pass_script +export SUDO_ASKPASS="$install_pass_script" if [ "$gtk_version" = "Uninstall" ] then uninstall - exit fi # Put the install log in tmp, to avoid writing to PWD during a new install @@ -460,7 +454,7 @@ do i=$((i + 1)) done -kill $zen_pid 2> /dev/null +kill "$zen_pid" 2> /dev/null # Ask the user which options to install if [ -n "$option_string" ] @@ -494,7 +488,7 @@ printf '%b\n' "#Getting new sources from server..." > "$zen_pipe" if [ "$mode" = "install" ] then - if ! git clone git://geeqie.org/geeqie.git >> "$install_log" 2>&1 + if ! git clone http://git.geeqie.org/git/geeqie.git >> "$install_log" 2>&1 then git_error=$(tail -n5 "$install_log" 2>&1) zenity --title="$title" --width=370 --height=400 --error --text="Git error:\n\n$git_error" 2> /dev/null @@ -518,7 +512,7 @@ fi printf '%b\n' "20" > "$zen_pipe" printf '%b\n' "#Cleaning installed version..." > "$zen_pipe" -if [ $mode = "install" ] +if [ "$mode" = "install" ] then cd geeqie || exit 1 else @@ -528,7 +522,7 @@ fi printf '%b\n' "30" > "$zen_pipe" printf '%b\n' "#Checkout required version..." > "$zen_pipe" -if [ "$BACK" ] +if [ -n "$BACK" ] then if ! git checkout master~"$BACK" >> "$install_log" 2>&1 then @@ -536,7 +530,7 @@ then zenity --title="$title" --width=370 --height=400 --error --text="Git error:\n\n$git_error" 2> /dev/null exit_install fi -elif [ "$COMMIT" ] +elif [ -n "$COMMIT" ] then if ! git checkout "$COMMIT" >> "$install_log" 2>&1 @@ -545,14 +539,13 @@ then zenity --title="$title" --width=370 --height=400 --error --text="Git error:\n\n$git_error" 2> /dev/null exit_install fi -elif [ "$TAG" ] +elif [ -n "$TAG" ] then if ! git checkout "$TAG" >> "$install_log" 2>&1 then git_error=$(tail -n5 "$install_log" 2>&1) zenity --title="$title" --width=370 --height=400 --error --text="Git error:\n\n$git_error" 2> /dev/null exit_install - exit fi fi @@ -567,10 +560,10 @@ then ninja -C build install else meson setup build - meson configure build -Dgtk3=false + meson configure --no-pager build printf '%b\n' "90 " > "$zen_pipe" printf '%b\n' "#Installing Geeqie..." > "$zen_pipe" - ninja -C build install + sudo --askpass meson install -C build fi rm "$install_pass_script"