scripts/src/clean-md5-cache
Maciej Barć 917dd8f982
src/*: add headers where appropriate
Signed-off-by: Maciej Barć <xgqt@protonmail.com>
2020-12-22 01:52:05 +01:00

27 lines
422 B
Bash
Executable File

#!/bin/sh
# Original author: XGQT
# Licensed under the ISC License
# Copyright (c) 2020, src_prepare group
# Clean md5-cache from the overlay directory
trap 'exit 128' INT
export PATH
cache="$(git rev-parse --show-cdup)metadata/md5-cache"
if [ -d "${cache}" ]
then
if ! rm -fr "${cache}"
then
sudo rm -fr "${cache}" || exit 1
fi
else
echo "No pre-generated md5-cache found in ${cache}"
fi