Merge branch 'master' into xw_1101
This commit is contained in:
commit
5c62a6ede5
|
@ -167,7 +167,7 @@ check()
|
|||
fi
|
||||
|
||||
if [ "${ver}" != "${magic}" ]; then
|
||||
echo "Please redeploy the remote environment"
|
||||
# echo "Please redeploy the remote environment"
|
||||
exit 104
|
||||
fi
|
||||
|
||||
|
@ -180,7 +180,7 @@ check()
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo "Please redeploy the remote environment" >&2
|
||||
# echo "Please redeploy the remote environment" >&2
|
||||
exit 104
|
||||
}
|
||||
|
||||
|
|
|
@ -179,10 +179,32 @@ function add_distcc()
|
|||
fi
|
||||
}
|
||||
|
||||
parentLib=0
|
||||
otherdirs=""
|
||||
function traverse_dir(){
|
||||
for file in $(ls $1); do
|
||||
if [ -d "$1/$file" ]; then
|
||||
if [ "$(basename $1/$file)" == "lib" -o "$(basename $1/$file)" == "libexec" -o $parentLib -ne 0 ]; then
|
||||
#if [ "$(basename $1/$file)" == "lib" -o "$(basename $1/$file)" == "bin" -o "$(basename $1/$file)" == "libexec" -o $parentLib -ne 0 ]; then
|
||||
parentLib=1
|
||||
traverse_dir "$1/$file"
|
||||
parentLib=0
|
||||
else
|
||||
otherdirs="$otherdirs $1/$file"
|
||||
fi
|
||||
else
|
||||
add_file "$1/$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
add_gcc
|
||||
add_clang
|
||||
add_distcc
|
||||
|
||||
if [ -d "$KYCODE_DISTBUILD_COMPILER_PATH" ]; then
|
||||
traverse_dir $(readlink -f $KYCODE_DISTBUILD_COMPILER_PATH/..)
|
||||
fi
|
||||
#search_addfile test
|
||||
#search_addfile true
|
||||
#search_addfile echo
|
||||
|
@ -207,7 +229,7 @@ do
|
|||
mkdir -p $tempdir/$(dirname $real_path)
|
||||
|
||||
if [ ! "$dist" == "$real_path" ]; then
|
||||
ln -s $real_path $tempdir/$dist
|
||||
ln -s $real_path $tempdir/$dist >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
progressing
|
||||
|
@ -235,12 +257,21 @@ if [ -d "$KYCODE_DISTBUILD_COMPILER_PATH" ]; then
|
|||
*"gcc"*) ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*"g++"*) ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*"cpp"*) ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*"as") ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*"as")
|
||||
ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin/as" >/dev/null 2>&1
|
||||
ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*"clang"*) ln -s $KYCODE_DISTBUILD_COMPILER_PATH/$f "$tempdir/usr/bin" >/dev/null 2>&1;;
|
||||
*) continue;
|
||||
esac
|
||||
done
|
||||
rm -rf $tempdir/home/$USER/.kycodedistbuild/corss-compiler
|
||||
|
||||
# if [ "$otherdirs" != "" ];then
|
||||
# for dir in $otherdirs;do
|
||||
# mkdir -p $tempdir/$(dirname $dir)
|
||||
# cp -rf $dir $tempdir/$(dirname $dir)
|
||||
# done
|
||||
# fi
|
||||
fi
|
||||
|
||||
for bin in $(ls $tempdir/usr/bin); do
|
||||
|
@ -248,7 +279,7 @@ for bin in $(ls $tempdir/usr/bin); do
|
|||
if [ "$bin" == "distcc" ]; then continue; fi
|
||||
if [ "$bin" == "true" ]; then continue; fi
|
||||
#echo "clang __clang__ gcc __GNUC__" | "$bin" -E - >/dev/null 2>&1 || continue
|
||||
ln -s ${DISTCC} $tempdir/usr/lib/distcc/$bin
|
||||
ln -s ${DISTCC} $tempdir/usr/lib/distcc/$bin >/dev/null 2>&1
|
||||
have_compiler=1
|
||||
done
|
||||
|
||||
|
@ -264,9 +295,9 @@ mkdir -p $tempdir/etc
|
|||
mkdir -p $tempdir/dev
|
||||
mkdir -p $tempdir/proc
|
||||
mkdir -p $tempdir/sys
|
||||
ln -s /usr/bin $tempdir/bin
|
||||
ln -s /usr/bin $tempdir/bin >/dev/null 2>&1
|
||||
if [ -d $tempdir/usr/sbin ]; then
|
||||
ln -s /usr/sbin $tempdir/sbin
|
||||
ln -s /usr/sbin $tempdir/sbin >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# ldconfig update cache
|
||||
|
|
Loading…
Reference in New Issue