#!/bin/bash
DEST=/vobs/android/src/nec/hal/ # the dest to import to
PKG=sec_test # the package name
BRANCH=sec_iw_sec_testcode #the branch name import onto
deepls() {
pushd $1
for x in `ls`
do
tail=${PWD}/$x
tail_1=${tail#/tmp/} #/get the sufix for mkbranch
if [ -f $x ]; then
#touch ${DEST}/${tail_1}
cleartool mkelem -nc -nco ${DEST}/${tail_1}
cleartool mkbranch -nc ${BRANCH} ${DEST}/${tail_1}
cp -rf ${PWD}/$x ${DEST}/${tail_1}
cleartool ci -nc ${DEST}/${tail_1}
fi
if [ -d $x ]; then
cleartool mkdir -nc -nco ${DEST}/${tail_1}
cleartool mkbranch -nc ${BRANCH} ${DEST}/${tail_1}
deepls "$x"
cleartool ci -nc ${DEST}/${tail_1}
popd
fi
done
}
#cleartool mkdir -nc -nco ${DEST}/${PKG} # mkdir(/main/0) first
cleartool mkbranch -nc ${BRANCH} ${DEST}/${PKG} # make the first branch
deepls $1
阅读(1263) | 评论(0) | 转发(0) |