Update 'duplicacy.sh'
This commit is contained in:
59
duplicacy.sh
59
duplicacy.sh
@@ -12,37 +12,42 @@ fi
|
|||||||
trap "rm -f ${lockfile}; exit" INT TERM EXIT
|
trap "rm -f ${lockfile}; exit" INT TERM EXIT
|
||||||
echo $$ > ${lockfile}
|
echo $$ > ${lockfile}
|
||||||
|
|
||||||
# Determine the Kernel and Architecture
|
# Duplicacy version update
|
||||||
KERNEL=$(uname)
|
LATEST_DUPLICACY_VERSION="2.6.1"
|
||||||
ARCH=$(uname -m)
|
INSTALLED_DUPLICACY_VERSION=$(duplicacy -h | awk '/VERSION:/{getline; print $1}')
|
||||||
if [ ${KERNEL} == 'Linux' ]; then
|
if [ ${LATEST_DUPLICACY_VERSION} != ${INSTALLED_DUPLICACY_VERSION} ]; then
|
||||||
if [ ${ARCH} == 'x86_64' ]; then
|
# Determine the Kernel and Architecture
|
||||||
cp -v $(dirname "$0")/binaries/duplicacy_linux_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
KERNEL=$(uname)
|
||||||
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
ARCH=$(uname -m)
|
||||||
elif [ ${ARCH} == 'aarch64' ]; then
|
if [ ${KERNEL} == 'Linux' ]; then
|
||||||
cp -v $(dirname "$0")/binaries/duplicacy_linux_arm64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
if [ ${ARCH} == 'x86_64' ]; then
|
||||||
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
cp -v $(dirname "$0")/binaries/duplicacy_linux_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
elif [ ${ARCH} == 'aarch64' ]; then
|
||||||
|
cp -v $(dirname "$0")/binaries/duplicacy_linux_arm64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
else
|
||||||
|
echo "Kernel Type: ${KERNEL}"
|
||||||
|
echo "Arch: ${ARCH}"
|
||||||
|
echo "Arch not supported."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
elif [ ${KERNEL} == 'FreeBSD' ]; then
|
||||||
|
if [ ${ARCH} == 'amd64' ]; then
|
||||||
|
cp -v $(dirname "$0")/binaries/duplicacy_freebsd_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||||
|
else
|
||||||
|
echo "Kernel Type: ${KERNEL}"
|
||||||
|
echo "Arch: ${ARCH}"
|
||||||
|
echo "Arch not supported."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Kernel Type: ${KERNEL}"
|
echo "Kernel Type: ${KERNEL}"
|
||||||
echo "Arch: ${ARCH}"
|
echo "Arch: ${ARCH}"
|
||||||
echo "Arch not supported."
|
echo "Kernel not supported."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
elif [ ${KERNEL} == 'FreeBSD' ]; then
|
|
||||||
if [ ${ARCH} == 'amd64' ]; then
|
|
||||||
cp -v $(dirname "$0")/binaries/duplicacy_freebsd_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
|
||||||
chmod +x /usr/bin/duplicacy >> ${LOGFILE}
|
|
||||||
else
|
|
||||||
echo "Kernel Type: ${KERNEL}"
|
|
||||||
echo "Arch: ${ARCH}"
|
|
||||||
echo "Arch not supported."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Kernel Type: ${KERNEL}"
|
|
||||||
echo "Arch: ${ARCH}"
|
|
||||||
echo "Kernel not supported."
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run the backup
|
# run the backup
|
||||||
|
|||||||
Reference in New Issue
Block a user