mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
cleanup scripts: tools/
This commit is contained in:
@@ -25,19 +25,17 @@ BUILD_SOURCES="false"
|
||||
REPLACE_OLD="false"
|
||||
NEW_SOURCES="${NEW_SOURCES_DIR:-${SOURCES}.new}"
|
||||
|
||||
|
||||
# helper functions
|
||||
help(){
|
||||
help() {
|
||||
echo "Usage: ${0} [-hdfbr]"
|
||||
echo "Set PROJECT, DEVICE and ARCH as required."
|
||||
echo " -h this help"
|
||||
echo " -d delete obsolete source packages (default no)"
|
||||
echo " -f fetch updated source packages (default: no)"
|
||||
echo " -b build new SOURCES content (default: no)"
|
||||
echo " -r replace old SOURCES when rebuilding (default: no)"
|
||||
echo "Set PROJECT, DEVICE and ARCH as required."
|
||||
echo " -h this help"
|
||||
echo " -d delete obsolete source packages (default no)"
|
||||
echo " -f fetch updated source packages (default: no)"
|
||||
echo " -b build new SOURCES content (default: no)"
|
||||
echo " -r replace old SOURCES when rebuilding (default: no)"
|
||||
}
|
||||
|
||||
|
||||
# command line opts
|
||||
while getopts hdfrb OPT; do
|
||||
case "${OPT}" in
|
||||
@@ -65,8 +63,7 @@ while getopts hdfrb OPT; do
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((${OPTIND}-1))
|
||||
|
||||
shift $((${OPTIND} - 1))
|
||||
|
||||
# sanity checking
|
||||
if [ ! -d "${SOURCES}" ]; then
|
||||
@@ -75,7 +72,6 @@ elif [ "${DESTRUCTIVE_RUN}" = "true" -a "${BUILD_SOURCES}" = "true" ]; then
|
||||
die "error: options '-d' and '-b' are mutually exclusive"
|
||||
fi
|
||||
|
||||
|
||||
# main
|
||||
# process files in SOURCES
|
||||
for SOURCE_PACKAGE in $(find "${SOURCES}/" -mindepth 1 -type d); do
|
||||
|
||||
Reference in New Issue
Block a user