File: checkout-deps.sh

package info (click to toggle)
liquidsoap 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,844 kB
  • sloc: ml: 74,136; javascript: 27,320; ansic: 505; sh: 139; xml: 114; lisp: 96; makefile: 26
file content (18 lines) | stat: -rwxr-xr-x 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

CWD="$(dirname "$0")"
BASEDIR="$(cd "$CWD/../../.." && pwd)"

for i in $(git log --reverse --pretty=format:%B origin/main..HEAD | grep '^DEPS=' | cut -d'=' -f 2  | tr ":" "\n"); do
  MODULE=$(echo "$i" | cut -d'#' -f 1)
  COMMIT=$(echo "$i" | cut -d'#' -f 2)
  echo "Checking out dep $MODULE on commit $COMMIT"

  cd "${BASEDIR}/${MODULE}" &&
    git fetch origin "$COMMIT" &&
    git reset --hard &&
    git checkout "$COMMIT" &&
    git submodule init &&
    git submodule update

done