summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-18 19:38:36 +0200
committerBruno Haible <bruno@clisp.org>2022-07-18 19:38:36 +0200
commit7c2834fb49945d6cbf4b7410cc68abf2a21e0296 (patch)
treecb8058760752e43eeede5c7c2905670b539c1413
parentf533f43da81bc8cdfb3cc100992cf396614ebebc (diff)
downloadlibunistring-7c2834fb49945d6cbf4b7410cc68abf2a21e0296.tar.gz
Make autopull.sh more suited for continuous integration.
* autopull.sh: Support option --one-time.
-rwxr-xr-xautopull.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/autopull.sh b/autopull.sh
index 0d08d35..4638d7b 100755
--- a/autopull.sh
+++ b/autopull.sh
@@ -17,8 +17,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Usage: ./autopull.sh
+# Usage: ./autopull.sh [--one-time]
+#
+# Options:
+# --one-time Optimize, assuming that the current directory will be
+# used to build the current version only and will be
+# thrown away afterwards.
+
+# Parse options.
+
+shallow=
+
+while :; do
+ case "$1" in
+ --one-time) shallow='--depth 1'; shift;;
+ *) break ;;
+ esac
+done
+
-./gitsub.sh pull || exit 1
+./gitsub.sh pull $shallow || exit 1
echo "$0: done. Now you can run './autogen.sh'."