aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-11-10 19:50:39 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2023-01-23 19:18:05 +0100
commit26bb4b409da1fe45c578ce985a429af663a8501a (patch)
tree3fdc9ba9833c4297993e9296de734a7b9217ca60 /scripts
parent1506f8c322c6f198d1903c62b19b9cbc12472b4e (diff)
downloadupstream-26bb4b409da1fe45c578ce985a429af663a8501a.tar.gz
upstream-26bb4b409da1fe45c578ce985a429af663a8501a.tar.bz2
upstream-26bb4b409da1fe45c578ce985a429af663a8501a.zip
scripts: ext-tools: add option to only refresh timestamps
It's possible to have prebuilt tools already extracted. Add option to just refresh the timestamps. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ext-tools.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/scripts/ext-tools.sh b/scripts/ext-tools.sh
index 13fbd43018..b58296be10 100755
--- a/scripts/ext-tools.sh
+++ b/scripts/ext-tools.sh
@@ -12,9 +12,7 @@ extract_prebuilt_tar() {
tar -xf "$1"
}
-install_prebuilt_tools() {
- extract_prebuilt_tar "$TOOLS_TAR"
-
+refresh_prebuilt_tools() {
if [ ! -d "$HOST_BUILD_DIR" ]; then
echo "Can't find Host Build Dir "$HOST_BUILD_DIR"" >&2
exit 1
@@ -33,6 +31,14 @@ install_prebuilt_tools() {
return 0
}
+install_prebuilt_tools() {
+ extract_prebuilt_tar "$TOOLS_TAR"
+
+ refresh_prebuilt_tools
+
+ return 0
+}
+
while [ -n "$1" ]; do
arg="$1"; shift
case "$arg" in
@@ -63,6 +69,12 @@ while [ -n "$1" ]; do
exit $?
;;
+ --refresh)
+ refresh_prebuilt_tools
+
+ exit $?
+ ;;
+
-h|--help)
me="$(basename "$0")"
echo -e "\nUsage:\n" >&2
@@ -81,8 +93,12 @@ while [ -n "$1" ]; do
echo -e " $me --tools {tar}" >&2
echo -e " Install the prebuilt tools present in the passed" >&2
echo -e " tar and prepare them." >&2
- echo -e " To correctly use them it's needed to update the." >&2
+ echo -e " To correctly use them it's needed to update the" >&2
echo -e " timestamp of each tools to skip recompilation.\n" >&2
+ echo -e " $me --refresh" >&2
+ echo -e " Refresh timestamps of already extracted prebuilt" >&2
+ echo -e " tools to correctly use them and skip" >&2
+ echo -e " recompilation.\n" >&2
echo -e " $me --help" >&2
echo -e " Display this help text and exit.\n\n" >&2
exit 1