]> git.ipfire.org Git - pakfire.git/blob - src/scripts/remove-static-libs
Cleanup database and add indexes.
[pakfire.git] / src / scripts / remove-static-libs
1 #!/bin/bash
2
3 echo "Removing unwanted static libraries..."
4
5 BUILDROOT=${1}
6 shift
7
8 for file in $(find ${BUILDROOT} -name "*.a" -or -name "*.la"); do
9 file=${file//${BUILDROOT}/}
10
11 keep=0
12 for skip in $@; do
13 if [ "${skip}" = "${file}" ]; then
14 keep=1
15 break
16 fi
17 done
18
19 if [ ${keep} -eq 0 ]; then
20 echo " Removing ${file}..."
21 rm -f ${BUILDROOT}/${file}
22 fi
23 done
24
25 exit 0