Fix numerical comparsion (Bash)

video-slicer-reencoder
Antonín Skala 2022-08-26 15:25:36 +02:00
parent c5879c4df8
commit 71e4098053
No known key found for this signature in database
GPG Key ID: F34A670905A79180
4 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,7 @@ declare -i getubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1)
echo "============="
echo " Ubuntu Version: $getubuntuversion"
echo "============="
if [[ "$getubuntuversion" == "16" || "$getubuntuversion" < "16" ]]; then
if [[ "$getubuntuversion" == "16" || "$getubuntuversion" -le "16" ]]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y

View File

@ -15,7 +15,7 @@ echo " Ubuntu Version: $getubuntuversion"
echo "============="
apt update -y
apt update --fix-missing -y
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" > "18" ]; then
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" -le "18" ]; then
apt install sudo wget -y
sudo apt install -y software-properties-common
sudo add-apt-repository universe -y
@ -66,7 +66,7 @@ if ! [ -x "$(command -v npm)" ]; then
fi
sudo apt install make zip -y
if ! [ -x "$(command -v ffmpeg)" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" < "16" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" -le "16" ]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y

View File

@ -22,7 +22,7 @@ if [ "$disableIpv6" = "y" ] || [ "$disableIpv6" = "Y" ]; then
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
fi
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" > "18" ]; then
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" -gt "18" ]; then
apt install sudo wget -y
sudo apt install -y software-properties-common
sudo add-apt-repository universe -y
@ -66,7 +66,7 @@ if ! [ -x "$(command -v npm)" ]; then
fi
sudo apt install make zip -y
if ! [ -x "$(command -v ffmpeg)" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" < "16" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" -le "16" ]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y

View File

@ -13,7 +13,7 @@ getubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1)
echo "============="
echo " Ubuntu Version: $getubuntuversion"
echo "============="
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" > "18" ]; then
if [ "$getubuntuversion" = "18" ] || [ "$getubuntuversion" -gt "18" ]; then
apt install sudo wget -y
sudo apt install -y software-properties-common
sudo add-apt-repository universe -y
@ -61,7 +61,7 @@ if ! [ -x "$(command -v npm)" ]; then
fi
sudo apt install make zip -y
if ! [ -x "$(command -v ffmpeg)" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" < "16" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" -le "16" ]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y