image_builder: little fixes

This commit is contained in:
Artem Smirnov
2018-09-25 23:12:21 +03:00
parent 74157b4901
commit 80669d7e2f
2 changed files with 4 additions and 4 deletions

View File

@@ -21,8 +21,8 @@ export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'}
export LANG=${LANG:='C.UTF-8'}
export LC_ALL=${LC_ALL:='C.UTF-8'}
BUILDER_DIR="$(pwd)"
REPO_DIR="$(pwd)/repo"
BUILDER_DIR="/builder"
REPO_DIR="${BUILDER_DIR}/repo"
SCRIPTS_DIR="${REPO_DIR}/builder"
IMAGES_DIR="${REPO_DIR}/images"
@@ -30,7 +30,7 @@ IMAGES_DIR="${REPO_DIR}/images"
[[ ! -d ${IMAGES_DIR} ]] && mkdir ${IMAGES_DIR} && echo_stamp "Directory ${IMAGES_DIR} was created successful"
IMAGE_VERSION="${TRAVIS_TAG:=$(cd ${REPO_DIR}; git log --format=%h -1)}"
REPO_URL="$(cd ${REPO_DIR}; git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1)"
REPO_URL="$(cd ${REPO_DIR}; git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1 | sed 's/git@github\.com\:/https\:\/\/github.com\//')"
REPO_NAME="$(basename -s '.git' ${REPO_URL})"
IMAGE_NAME="${REPO_NAME}_${IMAGE_VERSION}.img"
IMAGE_PATH="${IMAGES_DIR}/${IMAGE_NAME}"

View File

@@ -130,7 +130,7 @@ if [ "${INSTALL_ROS_PACK_SOURCES}" = "True" ]; then
chown -Rf pi:pi /home/pi/ros_catkin_ws
fi
echo_stamp "#12 Creating catkin_ws & Installing CLEVER-BUNDLE" \
echo_stamp "#12 Installing CLEVER" \
&& git clone ${REPO} /home/pi/catkin_ws/src/clever \
&& cd /home/pi/catkin_ws/src/clever \
&& git checkout ${REF} \