linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / build-support / upstream-updater / create-src-info-git.sh
blob6687a1f8f411241167d2dc572c2d6c28741a31ee
1 #! /bin/sh
3 [ -z "$1" ] && {
4 echo "Use $0 expression-basename repo-url branch-name package-base-name"
5 echo "Like:"
6 echo "$0 default http://git.example.com/repo origin/master hello"
7 exit 1;
8 } >&2
10 own_dir="$(cd "$(dirname "$0")"; sh -c pwd)"
12 cp "$own_dir/../builder-defs/template-bdp-uud.nix" "$1.nix"
13 sed -e "s@src-for-default.nix@src-for-$1.nix@g;
14 s@fetchUrlFromSrcInfo@fetchGitFromSrcInfo@g" -i "$1.nix"
15 echo '{}' > "src-for-$1.nix"
16 cat << EOF > src-info-for-$1.nix
18 repoUrl = "$2";
19 rev = "$3";
20 baseName = "$4";
21 method = "fetchgit";
23 EOF