clean_output.sh 428 B

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. set -e
  3. [ "$LEDE_TARGET" ] || exit 1
  4. . scripts/common.inc.sh
  5. if [ "$(expr match "$LEDE_TARGET" '.*-.*')" -gt 0 ]; then
  6. LEDE_BINDIR="${LEDE_TARGET//-/\/}"
  7. else
  8. LEDE_BINDIR="${LEDE_TARGET}/generic"
  9. fi
  10. rm -f "lede/bin/targets/${LEDE_BINDIR}"/* 2>/dev/null || true
  11. # Full builds will output the "packages" directory, so clean up first
  12. [ "$DEVICES" ] || rm -rf "lede/bin/targets/${LEDE_BINDIR}/packages"