File: clean.sh

package info (click to toggle)
weakforced 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,040 kB
  • sloc: cpp: 20,397; python: 2,002; sh: 700; makefile: 432
file content (18 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Dir of script
ROOT="$( cd "$(dirname "$0")" ; pwd -P )"

# Safety check
if [ -z "$ROOT" ] || [ ! -x "$ROOT/clean.sh" ] ; then
    echo "ERROR: unexpected ROOT"
    exit 9
fi

if [ ! -d "target" ] && [ -d "src" ]; then
    echo "WARNING: no target/ dir found here. This only cleans devenvs, not deployment roots."
fi

set -x
rm -rf "$ROOT/src" "$ROOT/target"
rm -f "$ROOT/bin"