Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 71f778f1 authored by Robert Nelson's avatar Robert Nelson
Browse files

ros: use ros in jessie/strech


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent 7e4e5288
No related merge requests found
#!/bin/sh -e
#
# Copyright (c) 2014 Robert Nelson <robertcnelson@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
export LC_ALL=C
#contains: rfs_username, release_date
if [ -f /etc/rcn-ee.conf ] ; then
. /etc/rcn-ee.conf
fi
if [ -f /etc/oib.project ] ; then
. /etc/oib.project
fi
export HOME=/home/${rfs_username}
export USER=${rfs_username}
export USERNAME=${rfs_username}
echo "env: [`env`]"
is_this_qemu () {
unset warn_qemu_will_fail
if [ -f /usr/bin/qemu-arm-static ] ; then
warn_qemu_will_fail=1
fi
}
qemu_warning () {
if [ "${warn_qemu_will_fail}" ] ; then
echo "Log: (chroot) Warning, qemu can fail here... (run on real armv7l hardware for production images)"
echo "Log: (chroot): [${qemu_command}]"
fi
}
git_clone () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone ${git_repo} ${git_target_dir} --depth 1 || true"
qemu_warning
git clone ${git_repo} ${git_target_dir} --depth 1 || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
git_clone_branch () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true"
qemu_warning
git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
git_clone_full () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone ${git_repo} ${git_target_dir} || true"
qemu_warning
git clone ${git_repo} ${git_target_dir} || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
cleanup_npm_cache () {
if [ -d /root/tmp/ ] ; then
rm -rf /root/tmp/ || true
fi
if [ -d /root/.npm ] ; then
rm -rf /root/.npm || true
fi
}
#custom functions...
is_this_qemu
#call your functions...
#
#!/bin/sh -e
#
# Copyright (c) 2014 Robert Nelson <robertcnelson@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
export LC_ALL=C
#contains: rfs_username, release_date
if [ -f /etc/rcn-ee.conf ] ; then
. /etc/rcn-ee.conf
fi
if [ -f /etc/oib.project ] ; then
. /etc/oib.project
fi
export HOME=/home/${rfs_username}
export USER=${rfs_username}
export USERNAME=${rfs_username}
echo "env: [`env`]"
is_this_qemu () {
unset warn_qemu_will_fail
if [ -f /usr/bin/qemu-arm-static ] ; then
warn_qemu_will_fail=1
fi
}
qemu_warning () {
if [ "${warn_qemu_will_fail}" ] ; then
echo "Log: (chroot) Warning, qemu can fail here... (run on real armv7l hardware for production images)"
echo "Log: (chroot): [${qemu_command}]"
fi
}
git_clone () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone ${git_repo} ${git_target_dir} --depth 1 || true"
qemu_warning
git clone ${git_repo} ${git_target_dir} --depth 1 || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
git_clone_branch () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true"
qemu_warning
git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
git_clone_full () {
mkdir -p ${git_target_dir} || true
qemu_command="git clone ${git_repo} ${git_target_dir} || true"
qemu_warning
git clone ${git_repo} ${git_target_dir} || true
sync
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt
}
cleanup_npm_cache () {
if [ -d /root/tmp/ ] ; then
rm -rf /root/tmp/ || true
fi
if [ -d /root/.npm ] ; then
rm -rf /root/.npm || true
fi
}
#custom functions...
is_this_qemu
#call your functions...
#
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment