diff options
author | Holger Behrens <holger.behrens@windriver.com> | 2012-08-08 21:43:46 +0200 |
---|---|---|
committer | Florin Sarbu <florin.sarbu@windriver.com> | 2012-08-10 16:26:49 +0300 |
commit | e7ed44b012c33f49c476688694d348919a46e836 (patch) | |
tree | f4d386bc03a29e193faef367bb8f3bfde5170870 | |
parent | 83e323403f71ca02c48b828282fe3983f1336c2d (diff) | |
download | meta-ivi-e7ed44b012c33f49c476688694d348919a46e836.tar.gz meta-ivi-e7ed44b012c33f49c476688694d348919a46e836.tar.bz2 meta-ivi-e7ed44b012c33f49c476688694d348919a46e836.zip |
dl_pkgs.sh: handle boot-manager rename, read and use DL_DIR
Handled GENIVI boot-manager component rename to node-startup-controller.
Also the script now takes into account the configured DL_DIR setting.
Added feature suggested by Laurent Emmerich allowing users to define
environment a variable GENIVI_USER and optionally GENIVI_PASS, which
if defined will later be used to git clone the required GENIVI
packages.
Signed-off-by: Holger Behrens <holger.behrens@windriver.com>
-rwxr-xr-x | scripts/dl_pkgs.sh | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/scripts/dl_pkgs.sh b/scripts/dl_pkgs.sh index a01d02d..055088f 100755 --- a/scripts/dl_pkgs.sh +++ b/scripts/dl_pkgs.sh @@ -20,30 +20,53 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -GIT_PACKAGES=(layer-management DLT-daemon AudioManager boot-manager) -GIT_URLS=(https://git.genivi.org/srv/git/layer_management https://git.genivi.org/srv/git/DLT-daemon https://git.genivi.org/srv/git/AudioManager https://git.genivi.org/srv/git/boot-manager) +GIT_PACKAGES=(layer-management DLT-daemon AudioManager node-startup-controller) +GIT_URLS=(https://git.genivi.org/srv/git/layer_management https://git.genivi.org/srv/git/DLT-daemon https://git.genivi.org/srv/git/AudioManager https://git.genivi.org/srv/git/node-startup-controller) +if [ -z "$BUILDDIR" ]; +then + echo -e "ERROR:\tOE build environment not set" + echo -e "\tThis should be done by, for example:" + echo -e "\t% source ./poky/oe-init-build-env" + exit 1 +else + # figure out Where to place downloads (configurable in local.conf) + eval `(cd $BUILDDIR && bitbake -e) | grep ^DL_DIR=` +fi -echo -e "\nCreating download directory ..." -mkdir -p ../downloads/git2 +if [ -z "$DL_DIR" ]; +then + GIT_DL_DIR="$BUILDDIR/downloads/git2" +else + GIT_DL_DIR="$DL_DIR/git2" +fi -echo -e "\nDownloading GENIVI packages ..." +echo -e "\nCreating GIT download directory ($GIT_DL_DIR) ..." +mkdir -p ${GIT_DL_DIR} +echo -e "Downloading GENIVI packages ..." -#Download GIT Packages +# Download GENIVI OSS Packages for index in ${!GIT_PACKAGES[*]} do echo -e "\nPACKAGE ${GIT_PACKAGES[$index]}" URLS2=${GIT_URLS[$index]/https:\/\/} URLS2=${URLS2//\//.} - if [ ! -f downloads/${URLS2}.done ] + if [ ! -f ${GIT_DL_DIR}/../${URLS2}.done ] then - rm -rf downloads/git2/${URLS2} - git clone -q --bare ${GIT_URLS[$index]} downloads/git2/${URLS2} + rm -rf ${GIT_DL_DIR}/${URLS2} + if [ -z "$GENIVI_USER" ]; + then + git clone -q --bare ${GIT_URLS[$index]} ${GIT_DL_DIR}/${URLS2} + else + git clone -q --bare ${GIT_URLS[$index]//:\/\//:\/\/$GENIVI_USER:$GENIVI_PASS@} ${GIT_DL_DIR}/${URLS2} + fi if [ $? == 0 ] then - touch downloads/${URLS2}.done + touch ${GIT_DL_DIR}/../${URLS2}.done fi else - echo "${GIT_PACKAGES[$index]} already downloaded" + # echo "${GIT_PACKAGES[$index]} already downloaded" + echo -e "\talready downloaded" fi done +echo "" |