github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/debian/helpers/gitcommit.sh (about)

     1  #!/bin/bash
     2  
     3  # Print the git commit associated with a version, for a given component.
     4  
     5  set -e
     6  set -u
     7  
     8  if [ $# -ne 2 ]; then
     9      echo >&2 "Usage: $0 COMPONENT UPSTREAM_VERSION"
    10      exit 1
    11  fi
    12  
    13  comp=$1
    14  version=$2
    15  
    16  # Get the "real" upstream version
    17  version=$( debian/helpers/real-upstream-version.sh "$version" )
    18  
    19  # Get corresponding git commit
    20  awk -F ': ' '$1 == "'"$version"'" {print $2}' debian/helpers/${comp}-gitcommits