From 9b9e3b19cdccf5e442c129d4814da7987afb16a7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 9 Jul 2021 14:14:34 +0200 Subject: Use autoclone where possible --- core/modules/usbguard/module.build | 5 +---- core/modules/usbguard/module.conf | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'core/modules/usbguard') diff --git a/core/modules/usbguard/module.build b/core/modules/usbguard/module.build index bbf5b330..d4879f91 100644 --- a/core/modules/usbguard/module.build +++ b/core/modules/usbguard/module.build @@ -2,10 +2,7 @@ fetch_source() { [ -d "${MODULE_WORK_DIR}/src/.git" ] && return 0 rm -rf -- "${MODULE_WORK_DIR}/src" download_untar "${REQUIRED_LIBSODIUM_URL}" "src/libsodium/" - git clone --depth 1 "${REQUIRED_GIT}" "${MODULE_WORK_DIR}/src/usbguard" || perror "Could not clone git to ${MODULE_WORK_DIR}/src/usbguard" - cd "${MODULE_WORK_DIR}/src/usbguard" - git checkout "${REQUIRED_COMMIT}" || perror "Could not switch to required commit" - cd - &>/dev/null + autoclone } build() { diff --git a/core/modules/usbguard/module.conf b/core/modules/usbguard/module.conf index cf9bfc10..61c83b6c 100644 --- a/core/modules/usbguard/module.conf +++ b/core/modules/usbguard/module.conf @@ -1,8 +1,7 @@ #!/bin/bash -REQUIRED_GIT="https://github.com/dkopecek/usbguard.git" +REQUIRED_GIT="https://github.com/dkopecek/usbguard.git||4ba9fbb337da439a1bcff6886847fb24b3df95b3" REQUIRED_LIBSODIUM_URL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.16.tar.gz" REQUIRED_LIBSODIUM_UNTAR_NAME="libsodium-1.0.16" -REQUIRED_COMMIT="4ba9fbb337da439a1bcff6886847fb24b3df95b3" REQUIRED_BINARIES="usbguard usbguard-daemon" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="/" -- cgit v1.2.3-55-g7522