1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#!/bin/bash
set -e
function usage()
{
cat <<EOF
Usage: pkgjs-lerna run <command>
pkgjs-lerna acts as lerna.
Copyright (C) Yadd <yadd@debian.org>
Licensed under GPL-2+ (see /usr/share/common-licenses/GPL-2)
EOF
}
if test "$1" = "--version" -o "$1" = "-v"; then
echo `perl -MDebian::PkgJs::Version -e 'print $VERSION'`
exit
fi
if test "$1" = "--help" -o "$1" = "-h"; then
usage
exit
fi
if test "$1" != run; then
echo 'Only "run" command is implemented' >&2
usage
exit 1
fi
shift
ORDER=`pkgjs-utils ordered_components_list`
for cmp in $ORDER; do
(
cd $cmp
echo "# $cmp"
pkgjs-run --if-exist "$@"
)
done
|