aboutsummaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
blob: 431577cbac2f45a1859fc4f5301fc4c7483b576b (plain)
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
#/bin/sh
##############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# stefan.k.berg@ericsson.com
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

echo "Installing pre-build repo"
if [ ! -d /opt/opnfv/nailgun ]; then
  echo "Error - found no repo!"
  exit 1
fi

mkdir -p /var/www/nailgun
mv /opt/opnfv/nailgun/* /var/www/nailgun
if [ $? -ne 0 ]; then
  echo "Error moving repos to their correct location!"
  exit 1
fi
rmdir /opt/opnfv/nailgun
if [ $? -ne 0 ]; then
  echo "Error removing /opt/opnfv/nailgun directory!"
  exit 1
fi
echo "Done installing pre-build repo"