File: distclean.sh

package info (click to toggle)
diskscan 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,656 kB
  • sloc: ansic: 11,136; python: 338; xml: 138; sh: 41; makefile: 34
file content (46 lines) | stat: -rwxr-xr-x 849 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

# distclean.sh for diskscan
# Copyright 2015 Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
# v2015111402
# This file can used under GPL-3+ license or BSD-3-Clause.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

PREFIX="."

# Files and directories to remove

OBJS="	CMakeFiles/ \
	Makefile \
	CMakeCache.txt \
	Documentation/diskscan.1 \
	cmake_install.cmake \
	install_manifest.txt \
	libscsicmd/src/CMakeFiles/ \
	libscsicmd/src/Makefile \
	libscsicmd/src/cmake_install.cmake \
        tags"

# Main procedures

remove_files () {
    if [ -e "$PREFIX/$TARGET" ]; then
        echo "Removing $PREFIX/$TARGET"
        rm -rf "${PREFIX:?}/$TARGET"
    else
        echo "$PREFIX/$TARGET NOT FOUND."
    fi
}

# Distclean

echo "DOING DISTCLEAN..."

for TARGET in $OBJS
do
    remove_files
done

echo "DONE."
echo