Skip to content

Commit

Permalink
Trivial change
Browse files Browse the repository at this point in the history
  • Loading branch information
gwillem committed Apr 2, 2024
1 parent 84cba28 commit 0ba09b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/import-composer-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ else
fi
echo "Using tempdir $tempdir"

default_packages="composer.base composer.pkgs"
source_pkgs="${1:-$default_packages}"

cleanup() {
echo "Cleaning up..."
Expand All @@ -24,7 +26,7 @@ trap cleanup EXIT INT TERM
export COMPOSER_HOME=$PWD/.composer

mkdir -p db
cat composer.base composer.pkgs | while read pkg; do
cat $source_pkgs | while read pkg; do
echo $pkg
for ver in $(composer show --no-interaction --no-plugins $pkg -a --format=json 2>/dev/null | jq -r '.versions[]' 2>/dev/null | head -n $maxpkgs); do
rm -rf $tempdir
Expand Down Expand Up @@ -53,4 +55,5 @@ cat composer.base composer.pkgs | while read pkg; do
done
done

corediff -d m2.db -m db/*.db
corediff -d m2.db -m db/*.db
chmod 644 m2.db

0 comments on commit 0ba09b0

Please sign in to comment.