Add function to check all dependencies
This commit is contained in:
parent
aa794ea621
commit
c9af167626
33
src/ks-avi
33
src/ks-avi
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-avi (ks-tools) - Convert video to AVI format #
|
# ks-avi (ks-tools) - Convert video to AVI format #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -107,13 +107,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-crop
33
src/ks-crop
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-crop (ks-tools) - Crop or change aspect ratio of a video #
|
# ks-crop (ks-tools) - Crop or change aspect ratio of a video #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -54,13 +54,34 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-crop (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-crop (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-mix
33
src/ks-mix
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
|
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
#####################################################################
|
#####################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -43,13 +43,34 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed cut head tail tr"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-mp3
33
src/ks-mp3
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
|
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
|
||||||
# Date: 04-02-2022 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="040222"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -59,13 +59,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -66,13 +66,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep find grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-mp4
33
src/ks-mp4
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4 (ks-tools) - Convert video to MP4 format #
|
# ks-mp4 (ks-tools) - Convert video to MP4 format #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -107,13 +107,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-mp4k
33
src/ks-mp4k
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
|
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -107,13 +107,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
33
src/ks-mp4s
33
src/ks-mp4s
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
|
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
|
||||||
# Date: 10-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="100223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Detect version ffmpeg for old releases
|
# Detect version ffmpeg for old releases
|
||||||
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
|
||||||
|
@ -107,13 +107,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -20,6 +20,39 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
|
||||||
source "/usr/bin/cygwin-alias.sh"
|
source "/usr/bin/cygwin-alias.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if ffmpeg is installed
|
||||||
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
|
dependencies="ffmpeg grep find grep cut head tail cat"
|
||||||
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "* ks-mp4s-folder (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
echo ""
|
||||||
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# Show help when folder is empty
|
# Show help when folder is empty
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
|
|
33
src/ks-oga
33
src/ks-oga
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
|
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
|
||||||
# Date: 04-02-2022 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="040222"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -59,13 +59,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep sed grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -66,13 +66,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep find grep cut head tail tr cat"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# ks-upa (ks-tools) - Upload audio file(s) to server with scp or rsync #
|
# ks-upa (ks-tools) - Upload audio file(s) to server with scp or rsync #
|
||||||
# Date: 12-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
########################################################################
|
########################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="120223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -659,7 +659,7 @@ function showHelp() {
|
||||||
# for the execution are installed.
|
# for the execution are installed.
|
||||||
function checkDependencies() {
|
function checkDependencies() {
|
||||||
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
dependencies="sshpass expect rsync md5sum scp ssh"
|
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat"
|
||||||
dependencies_found=""
|
dependencies_found=""
|
||||||
dependencies_not_found=""
|
dependencies_not_found=""
|
||||||
for checkPath in ${path_check} ; do
|
for checkPath in ${path_check} ; do
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# ks-upf (ks-tools) - Upload common file(s) to server with scp or rsync #
|
# ks-upf (ks-tools) - Upload common file(s) to server with scp or rsync #
|
||||||
# Date: 12-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="120223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -686,7 +686,7 @@ function showHelp() {
|
||||||
# for the execution are installed.
|
# for the execution are installed.
|
||||||
function checkDependencies() {
|
function checkDependencies() {
|
||||||
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
dependencies="sshpass expect rsync md5sum scp ssh"
|
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat"
|
||||||
dependencies_found=""
|
dependencies_found=""
|
||||||
dependencies_not_found=""
|
dependencies_not_found=""
|
||||||
for checkPath in ${path_check} ; do
|
for checkPath in ${path_check} ; do
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# ks-upr (ks-tools) - Upload recursively file(s) to server with scp or rsync #
|
# ks-upr (ks-tools) - Upload recursively file(s) to server with scp or rsync #
|
||||||
# Date: 12-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="120223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -563,7 +563,7 @@ function showHelp() {
|
||||||
# for the execution are installed.
|
# for the execution are installed.
|
||||||
function checkDependencies() {
|
function checkDependencies() {
|
||||||
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
dependencies="sshpass expect rsync md5sum scp ssh"
|
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat"
|
||||||
dependencies_found=""
|
dependencies_found=""
|
||||||
dependencies_not_found=""
|
dependencies_not_found=""
|
||||||
for checkPath in ${path_check} ; do
|
for checkPath in ${path_check} ; do
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# ks-upv (ks-tools) - Upload videos file(s) to server with scp or rsync #
|
# ks-upv (ks-tools) - Upload videos file(s) to server with scp or rsync #
|
||||||
# Date: 12-02-2023 #
|
# Date: 13-02-2023 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@duck.com #
|
# Contact: q3aql@duck.com #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
VERSION="8.4-dev"
|
VERSION="8.4-dev"
|
||||||
M_DATE="120223"
|
M_DATE="130223"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -659,7 +659,7 @@ function showHelp() {
|
||||||
# for the execution are installed.
|
# for the execution are installed.
|
||||||
function checkDependencies() {
|
function checkDependencies() {
|
||||||
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
dependencies="sshpass expect rsync md5sum scp ssh"
|
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat"
|
||||||
dependencies_found=""
|
dependencies_found=""
|
||||||
dependencies_not_found=""
|
dependencies_not_found=""
|
||||||
for checkPath in ${path_check} ; do
|
for checkPath in ${path_check} ; do
|
||||||
|
|
29
src/ks-vob
29
src/ks-vob
|
@ -25,13 +25,34 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ffmpeg is installed
|
# Check if ffmpeg is installed
|
||||||
ffmpeg_test=$(ffmpeg --help 2>&1)
|
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
|
||||||
error_ffmpeg=$?
|
dependencies="ffmpeg grep grep cut head tail tr"
|
||||||
if [ ${error_ffmpeg} -ne 0 ] ; then
|
dependencies_found=""
|
||||||
|
dependencies_not_found=""
|
||||||
|
for checkPath in ${path_check} ; do
|
||||||
|
for checkDependencies in ${dependencies} ; do
|
||||||
|
if [ -f ${checkPath}/${checkDependencies} ] ; then
|
||||||
|
dependencies_found="${dependencies_found} ${checkDependencies}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
for notFound in ${dependencies} ; do
|
||||||
|
check_found_one=$(echo ${dependencies_found} | grep " ${notFound}")
|
||||||
|
check_found_two=$(echo ${dependencies_found} | grep "${notFound} ")
|
||||||
|
if_not_found="${check_found_one}${check_found_two}"
|
||||||
|
if [ -z "${if_not_found}" ] ; then
|
||||||
|
dependencies_not_found="${dependencies_not_found} ${notFound}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Show if all tools are installed
|
||||||
|
if [ -z "${dependencies_not_found}" ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The 'ffmpeg' tool is not installed!"
|
echo "* Some required tools are not installed:${dependencies_not_found}"
|
||||||
|
echo "* The process has been stopped"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user