~ines-almeida/ols-jenkaas/add-build-command-txpkgupload-job

« back to all changes in this revision

Viewing changes to project/setup-trunk-with-git

  • Committer: Guillermo Gonzalez
  • Author(s): Colin Watson
  • Date: 2023-04-05 13:47:17 UTC
  • mfrom: (881.1.2 launchpad-build-db-devel)
  • Revision ID: guillermo.gonzalez@canonical.com-20230405134717-1aji7dnq4ri7mw4j

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
BRANCH=$1
4
4
TREE_DIR=$2
 
5
REF=$3
5
6
 
6
7
if [ -d $TREE_DIR ] ; then
7
8
    rm -fr $TREE_DIR
8
9
fi
9
10
git clone $BRANCH $TREE_DIR
 
11
if [ "$REF" ]; then
 
12
    git checkout "$REF"
 
13
fi