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
|
||||
echo $$ > ${lockfile}
|
||||
|
||||
# Determine the Kernel and Architecture
|
||||
KERNEL=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
if [ ${KERNEL} == 'Linux' ]; then
|
||||
if [ ${ARCH} == 'x86_64' ]; then
|
||||
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}
|
||||
# Duplicacy version update
|
||||
LATEST_DUPLICACY_VERSION="2.6.1"
|
||||
INSTALLED_DUPLICACY_VERSION=$(duplicacy -h | awk '/VERSION:/{getline; print $1}')
|
||||
if [ ${LATEST_DUPLICACY_VERSION} != ${INSTALLED_DUPLICACY_VERSION} ]; then
|
||||
# Determine the Kernel and Architecture
|
||||
KERNEL=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
if [ ${KERNEL} == 'Linux' ]; then
|
||||
if [ ${ARCH} == 'x86_64' ]; then
|
||||
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
|
||||
echo "Kernel Type: ${KERNEL}"
|
||||
echo "Arch: ${ARCH}"
|
||||
echo "Arch not supported."
|
||||
exit
|
||||
echo "Kernel 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
|
||||
echo "Kernel Type: ${KERNEL}"
|
||||
echo "Arch: ${ARCH}"
|
||||
echo "Kernel not supported."
|
||||
exit
|
||||
fi
|
||||
|
||||
# run the backup
|
||||
|
||||
Reference in New Issue
Block a user