create-pkg 375 B

1234567891011
  1. #!/usr/bin/env bash
  2. topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
  3. mkdir -p $topdir/target/packages/pkg-enabled
  4. rm $topdir/target/packages/pkg-enabled/* 2>/dev/null
  5. count=1
  6. for i in $(ls $topdir/target/packages/pkg-available/);do
  7. cd $topdir/target/packages/pkg-enabled &&
  8. ln -sf ../pkg-available/$i $count-$i
  9. count=$((count+1))
  10. done