Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2022-11-10 21:45:29 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2022-11-10 21:45:29 +0300
commit2d1e83e668625ef3f7b7ef28221613a60e195bca (patch)
treed765684c35b0991ff3b45cbfaef44f9c337b1d27
parent4ff984cffbbadf6efcff3f6b057336929be37326 (diff)
Add compatibility to openSUSE and derivatives and trim dependencies installation
-rw-r--r--README.md3
-rw-r--r--Scripts/install-dependencies.sh11
-rw-r--r--Scripts/install-uvtools.sh13
3 files changed, 22 insertions, 5 deletions
diff --git a/README.md b/README.md
index 54f50ec..68d7227 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,10 @@
## To auto install on Linux:
```bash
-[ "$(command -v apt-get)" -a -z "$(command -v curl)" ] && sudo apt-get install -y curl
+[ "$(command -v apt)" -a -z "$(command -v curl)" ] && sudo apt-get install -y curl
[ "$(command -v pacman)" -a -z "$(command -v curl)" ] && sudo pacman -S curl
[ "$(command -v dnf)" -a -z "$(command -v curl)" ] && sudo dnf install -y curl
+[ "$(command -v zypper)" -a -z "$(command -v curl)" ] && sudo zypper install -y curl
bash -c "$(curl -fsSL https://raw.githubusercontent.com/sn4k3/UVtools/master/Scripts/install-uvtools.sh)"
```
diff --git a/Scripts/install-dependencies.sh b/Scripts/install-dependencies.sh
index 0b1dd21..2170282 100644
--- a/Scripts/install-dependencies.sh
+++ b/Scripts/install-dependencies.sh
@@ -36,23 +36,28 @@ elif testcmd apt; then
#apt install -y libdc1394-22 libopenexr24
#apt install -y libdc1394-25 libopenexr25
#apt install -y libjpeg-dev libpng-dev libgeotiff-dev libgeotiff5 libavcodec-dev libavformat-dev libswscale-dev libtbb-dev libgl1-mesa-dev libgdiplus
- apt install -y libjpeg-dev libpng-dev libgeotiff-dev libgeotiff5 libtbb-dev libgdiplus
+ apt install -y libgeotiff5 libgdiplus
# mini only requires: libgdiplus libgeotiff-dev libgeotiff5
elif testcmd pacman; then
osVariant="arch"
pacman -Syu
#pacman -S openjpeg2 libjpeg-turbo libpng libgeotiff libdc1394 ffmpeg openexr tbb libgdiplus
- pacman -S libpng openjpeg2 libjpeg-turbo libgeotiff tbb libgdiplus
+ pacman -S libgeotiff libgdiplus
elif testcmd dnf; then
osVariant="rhel"
dnf update -y
#dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
#dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
#dnf install -y libjpeg-devel libjpeg-turbo-devel libpng-devel libgeotiff-devel libdc1394-devel ffmpeg-devel tbb-devel mesa-libGL libgdiplus
- dnf install -y libjpeg-devel libjpeg-turbo-devel libpng-devel libgeotiff-devel tbb-devel libgdiplus
+ dnf install -y libgeotiff libgdiplus
+elif testcmd zypper; then
+ osVariant="suse"
+ zypper refresh
+ zypper install -y libgeotiff5 libgdiplus0
else
echo "Error: Base operative system / package manager not identified, nothing was installed"
exit -1
fi
+echo "- Detected: $osVariant $arch"
echo "Completed: You can now run UVtools"
diff --git a/Scripts/install-uvtools.sh b/Scripts/install-uvtools.sh
index d8332b2..6bbf4ad 100644
--- a/Scripts/install-uvtools.sh
+++ b/Scripts/install-uvtools.sh
@@ -183,6 +183,9 @@ elif testcmd pacman; then
elif testcmd dnf; then
osVariant="rhel"
[ -z "$(command -v curl)" ] && sudo dnf install -y curl
+elif testcmd zypper; then
+ osVariant="suse"
+ [ -z "$(command -v curl)" ] && sudo zypper install -y curl
fi
if [ -z "$osVariant" ]; then
@@ -211,8 +214,16 @@ if [ $(version $lddversion) -lt $(version $requiredlddversion) ]; then
exit -1
fi
+
+LDCONFIG=''
if testcmd ldconfig; then
- if [ -z "$(ldconfig -p | grep libpng)" -o -z "$(ldconfig -p | grep libgdiplus)" -o -z "$(ldconfig -p | grep libgeotiff)" ]; then
+ LDCONFIG='ldconfig'
+else
+ LDCONFIG="$(whereis ldconfig | awk '{ print $2 }')"
+fi
+
+if [ -n "$LDCONFIG" ]; then
+ if [ -z "$($LDCONFIG -p | grep libgeotiff)" -o -z "$($LDCONFIG -p | grep libgdiplus)" ]; then
echo "- Missing dependencies found, installing..."
sudo bash -c "$(curl -fsSL $dependencies_url)"
fi