mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 05:46:30 +02:00
cleanup the build file
- get branch name from shell - use git log instead of git show-ref for get the commit - fix the file path - remove checkout to tracking_backfire branch Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
parent
8d7f80616d
commit
271ec5cd73
@ -10,11 +10,11 @@ DATE=$(date "+%Y-%m-%d")
|
||||
TIME=$(date "+%H-%M-%S")
|
||||
DATE_TIME="${DATE}_${TIME}"
|
||||
|
||||
FEEDS_CONF="feeds.conf.default"
|
||||
FEEDS_CONF="data/qi_lb60/conf/feeds.conf"
|
||||
test -f "feeds.conf" && FEEDS_CONF="feeds.conf"
|
||||
|
||||
if [ "${0}" != "./scripts/build" ]; then
|
||||
echo "Please call me that way: ./scripts/build"
|
||||
if [ "${0}" != "data/qi_lb60/scripts/build" ]; then
|
||||
echo "Please call me that way: data/qi_lb60/scripts/build"
|
||||
echo " - out of the main directory"
|
||||
exit 1
|
||||
fi
|
||||
@ -60,7 +60,6 @@ mkdir xburst
|
||||
|
||||
echo "updating git repo..."
|
||||
git stash
|
||||
git checkout tracking_backfire
|
||||
git pull > /dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: updating openwrt-xburst failed"
|
||||
@ -83,10 +82,10 @@ fi
|
||||
echo "getting version numbers of used repositories..."
|
||||
feeds="$(cat "${FEEDS_CONF}" | grep -v -E "^#")"
|
||||
VERSIONS_FILE="xburst/VERSIONS"
|
||||
echo "# base :: 'openwrt' [scm-protocol] [revision] [source] [branch]" > ${VERSIONS_FILE}
|
||||
tmp=($(git show-ref | head -n 1))
|
||||
rev=${tmp[0]}
|
||||
echo "openwrt git ${rev} git://projects.qi-hardware.com/openwrt-xburst.git tracking_backfire" >> ${VERSIONS_FILE}
|
||||
echo "# base :: 'openwrt' [scm-protocol] [source] [branch] [revision]" > ${VERSIONS_FILE}
|
||||
rev=$(git log | head -n 1 | cut -b8-)
|
||||
branch=$(git branch | grep "*" | cut -b3-)
|
||||
echo "openwrt git git://projects.qi-hardware.com/openwrt-xburst.git ${branch} ${rev}" >> ${VERSIONS_FILE}
|
||||
echo "# feeds :: [feedname] [scm-protocol] [revision]" >> ${VERSIONS_FILE}
|
||||
IFS=$'\n'
|
||||
for feed in $feeds; do
|
||||
@ -99,8 +98,8 @@ for feed in $feeds; do
|
||||
rev=${tmp[1]}
|
||||
fi
|
||||
if [ "$proto" = "git" ]; then
|
||||
cd feeds/${arr[1]} && tmp=($(git show-ref | head -n 1)) && cd ../../
|
||||
rev=${tmp[0]}
|
||||
cd feeds/${arr[1]} && tmp=($(git log | head -n 1)) && cd ../../
|
||||
rev=${tmp[1]}
|
||||
fi
|
||||
echo "${dir} ${proto} ${rev}" >> ${VERSIONS_FILE}
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user