Commit ee4670a8 authored by Bruno BELANYI's avatar Bruno BELANYI
Browse files

woodpecker-cli: add deprecation wrapper

parent 3d7e60be
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,14 @@ in
    for f in *; do
      if [ "$f" = cli ]; then
        mv -- "$f" "woodpecker"
        # Issue a warning to the user if they call the deprecated executable
        cat >woodpecker-cli << EOF
    #/bin/sh
    echo 'WARNING: calling `woodpecker-cli` is deprecated, use `woodpecker` instead.' >&2
    $out/bin/woodpecker "\$@"
    EOF
        chmod +x woodpecker-cli
        patchShebangs woodpecker-cli
      else
        mv -- "$f" "woodpecker-$f"
      fi