woodpecker-cli: add deprecation wrapper

This commit is contained in:
Bruno BELANYI
2024-02-13 11:15:39 +00:00
parent 3d7e60beb0
commit ee4670a821
@@ -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