]> git.ipfire.org Git - people/ms/pakfire.git/blame - tools/remove-static-libs
Rename scripts dir to tools.
[people/ms/pakfire.git] / tools / remove-static-libs
CommitLineData
87745c01
MT
1#!/bin/bash
2
3echo "Removing unwanted static libraries..."
4
5BUILDROOT=${1}
6shift
7
8for 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
23done
24
25exit 0