4 HOST_BUILD_DIR
=$
(pwd)/"build_dir/host"
5 HOST_STAGING_DIR_STAMP
=$
(pwd)/"staging_dir/host/stamp"
8 find -H "$1" -not -type l
-print0 |
xargs -0 touch
11 extract_prebuilt_tar
() {
15 refresh_prebuilt_tools
() {
16 if [ ! -d "$HOST_BUILD_DIR" ]; then
17 echo "Can't find Host Build Dir "$HOST_BUILD_DIR"" >&2
21 refresh_timestamps
"$HOST_BUILD_DIR"
24 if [ ! -d "$HOST_STAGING_DIR_STAMP" ]; then
25 echo "Can't find Host Staging Dir Stamp "$HOST_STAGING_DIR_STAMP"" >&2
29 refresh_timestamps
"$HOST_STAGING_DIR_STAMP"
34 install_prebuilt_tools
() {
35 extract_prebuilt_tar
"$TOOLS_TAR"
37 refresh_prebuilt_tools
47 echo "Directory '$1' does not exist." >&2
50 HOST_BUILD_DIR
="$(cd "$1"; pwd)"; shift
53 --host-staging-dir-stamp)
55 echo "Directory '$1' does not exist." >&2
58 HOST_STAGING_DIR_STAMP
="$(cd "$1"; pwd)"; shift
63 echo "Tools tar file '$1' does not exist." >&2
67 install_prebuilt_tools
73 refresh_prebuilt_tools
80 echo -e "\nUsage:\n" >&2
81 echo -e " $me --host-build-dir {directory}" >&2
82 echo -e " Set to refresh timestamp of this build directory" >&2
83 echo -e " with --tools." >&2
84 echo -e " THIS OPTION MUST BE SET BEFORE --tools." >&2
85 echo -e " If not provided the default directory is:" >&2
86 echo -e " $(pwd)/build_dir/host\n" >&2
87 echo -e " $me --host-staging-dir-stamp {directory}" >&2
88 echo -e " Set to refresh staging timestamp present in this" >&2
89 echo -e " directory with --tools." >&2
90 echo -e " THIS OPTION MUST BE SET BEFORE --tools." >&2
91 echo -e " If not provided the default directory is:" >&2
92 echo -e " $(pwd)/staging_dir/host/stamp\n" >&2
93 echo -e " $me --tools {tar}" >&2
94 echo -e " Install the prebuilt tools present in the passed" >&2
95 echo -e " tar and prepare them." >&2
96 echo -e " To correctly use them it's needed to update the" >&2
97 echo -e " timestamp of each tools to skip recompilation.\n" >&2
98 echo -e " $me --refresh" >&2
99 echo -e " Refresh timestamps of already extracted prebuilt" >&2
100 echo -e " tools to correctly use them and skip" >&2
101 echo -e " recompilation.\n" >&2
102 echo -e " $me --help" >&2
103 echo -e " Display this help text and exit.\n\n" >&2
108 echo "Unknown argument '$arg'" >&2