-
Notifications
You must be signed in to change notification settings - Fork 50
/
.clean-install.sh
executable file
·54 lines (41 loc) · 2.32 KB
/
.clean-install.sh
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
47
48
49
50
51
52
53
54
#!/bin/bash
cd $(dirname ${0})
#######################################################################################################################
# check arguments
PLATFORM=$1
if [ -z "${PLATFORM}" ] || [ ! -e "plugins-dep/configs/${PLATFORM}_defconfig" ]; then
echo "Usage: $0 <platform>"
echo " Where platform can be one of: $(echo $(ls plugins-dep/configs | grep _defconfig | sed 's/_defconfig//g' | sort))"
exit 1
fi
#######################################################################################################################
# Import common code and variables
source .common
#######################################################################################################################
# cleanup
mv ${BUILD_DIR}/${BUILDROOT_VERSION} ${WORKDIR}/${PLATFORM}/${BUILDROOT_VERSION}
rm -rf ${BUILD_DIR}/*/*
rm -rf ${BUILD_DIR}/*/._*
rm -rf ${BUILD_DIR}/*/.hg*
rm -rf ${BUILD_DIR}/*/.git*
rm -rf ${BUILD_DIR}/*/.libs
rm -rf ${BUILD_DIR}/*/.waf-*
rm -rf ${DOWNLOAD_DIR}/*
rm -rf ${WORKDIR}/${PLATFORM}/images/*
mv ${WORKDIR}/${PLATFORM}/${BUILDROOT_VERSION} ${BUILD_DIR}/${BUILDROOT_VERSION}
rm -rf ${BUILD_DIR}/${CT_NG_VERSION}
mkdir ${BUILD_DIR}/${CT_NG_VERSION}
touch ${BUILD_DIR}/${CT_NG_VERSION}/.stamp_configured
touch ${BUILD_DIR}/${CT_NG_VERSION}/.stamp_built1
touch ${BUILD_DIR}/${CT_NG_VERSION}/.stamp_built2
touch ${BUILD_DIR}/${CT_NG_VERSION}/.stamp_patched
touch ${BUILD_DIR}/${CT_NG_VERSION}/configure
if [ "${BUILDROOT_VERSION}" = "buildroot-2016.02" ]; then
# fix various autoconf-related dependency_libs
sed -i -e "s|${BUILD_DIR}/libglib2-2.46.2/gobject/|${WORKDIR}/${PLATFORM}/staging/usr/lib/|g" ${WORKDIR}/${PLATFORM}/staging/usr/lib/*.la
sed -i -e "s|${BUILD_DIR}/libglib2-2.46.2/gmodule/|${WORKDIR}/${PLATFORM}/staging/usr/lib/|g" ${WORKDIR}/${PLATFORM}/staging/usr/lib/*.la
sed -i -e "s|${BUILD_DIR}/libglib2-2.46.2/glib/|${WORKDIR}/${PLATFORM}/staging/usr/lib/|g" ${WORKDIR}/${PLATFORM}/staging/usr/lib/*.la
sed -i -e "s|${BUILD_DIR}/libvorbis-1.3.5/lib/|${WORKDIR}/${PLATFORM}/staging/usr/lib/|g" ${WORKDIR}/${PLATFORM}/staging/usr/lib/*.la
sed -i -e "s|${BUILD_DIR}/util-linux-2.27.1/|${WORKDIR}/${PLATFORM}/staging/usr/lib/|g" ${WORKDIR}/${PLATFORM}/staging/usr/lib/*.la
fi
#######################################################################################################################