Browse Source

Add a cleanup script

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0
falkTX 4 years ago
parent
commit
9251e738fe
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 36 additions and 1 deletions
  1. +33
    -0
      .cleanup.sh
  2. +3
    -1
      setup/functions.sh

+ 33
- 0
.cleanup.sh View File

@@ -0,0 +1,33 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

# ---------------------------------------------------------------------------------------------------------------------

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh

# ---------------------------------------------------------------------------------------------------------------------

set -u

rm -rf ${PAWPAW_BUILDDIR}/*/*
rm -rf ${PAWPAW_BUILDDIR}/*/._*
rm -rf ${PAWPAW_BUILDDIR}/*/.hg*
rm -rf ${PAWPAW_BUILDDIR}/*/.git*
rm -rf ${PAWPAW_BUILDDIR}/*/.libs
rm -rf ${PAWPAW_BUILDDIR}/*/.waf-*

# ---------------------------------------------------------------------------------------------------------------------

+ 3
- 1
setup/functions.sh View File

@@ -461,7 +461,9 @@ function patch_file() {

local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"

sed -i -e "${rule}" "${pkgdir}/${file}"
if [ -e "${pkgdir}/${file}" ]; then
sed -i -e "${rule}" "${pkgdir}/${file}"
fi
}

function copy_file() {


Loading…
Cancel
Save