osmith submitted this change.
src/_update_src_copy: move functions to top
Prepare to add a new function in the next patch that gets called early.
Change-Id: I9a2b346e8e6d9a33aa4fc55add6bb9124ea2d3ed
---
M src/_update_src_copy.sh
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/_update_src_copy.sh b/src/_update_src_copy.sh
index d80b5fa..a0ea533 100644
--- a/src/_update_src_copy.sh
+++ b/src/_update_src_copy.sh
@@ -2,20 +2,6 @@
# Update the src_copy dir with all relevant files from the original git
# repository (+ submodules). Used by gen_makefile.py --autoreconf-in-src-copy.
-MAKE_DIR="$PWD"
-SRC_DIR="$1"
-PROJ="$2"
-TIME_START="$3"
-MARKER="$MAKE_DIR/.make.$PROJ.src_copy"
-
-# Don't run more than once per "make" call
-if [ "$(cat "$MARKER" 2>/dev/null)" = "$TIME_START" ]; then
- exit 0
-fi
-
-DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ"
-COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)"
-
update_git_dir() {
local src="$1"
local dest="$DEST_DIR_PROJ/$(echo "$src" | cut -c 3-)" # cut: remove './'
@@ -75,6 +61,20 @@
done
}
+MAKE_DIR="$PWD"
+SRC_DIR="$1"
+PROJ="$2"
+TIME_START="$3"
+MARKER="$MAKE_DIR/.make.$PROJ.src_copy"
+
+# Don't run more than once per "make" call
+if [ "$(cat "$MARKER" 2>/dev/null)" = "$TIME_START" ]; then
+ exit 0
+fi
+
+DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ"
+COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)"
+
cd "$SRC_DIR/$PROJ"
update_git_dirs_all
rm "$COPY_LIST"
To view, visit change 39818. To unsubscribe, or for help writing mail filters, visit settings.