Skip to content
Snippets Groups Projects
Commit c5f11c93 authored by Bob Mottram's avatar Bob Mottram
Browse files

Only wget if local files aren't available

parent 8ddaf7f2
No related branches found
No related tags found
No related merge requests found
......@@ -54,13 +54,24 @@ function beaglebone_flasher {
mkdir -p "$$rootdirEMMC_DIR"
fi
if [ "$rootdir" ]; then
# shellcheck disable=SC2086
if [ -f ~/${PROJECT_NAME}/image_build/emmc_functions.sh ]; then
# shellcheck disable=SC2086
chroot "$rootdir" $INSTALL_PACKAGES wget rsync
cp ~/${PROJECT_NAME}/image_build/emmc_functions.sh "$rootdir$EMMC_DIR/functions.sh"
else
$INSTALL_PACKAGES wget rsync
if [ -f /root/${PROJECT_NAME}/image_build/emmc_functions.sh ]; then
# shellcheck disable=SC2086
cp /root/${PROJECT_NAME}/image_build/emmc_functions.sh "$rootdir$EMMC_DIR/functions.sh"
else
if [ "$rootdir" ]; then
# shellcheck disable=SC2086
chroot "$rootdir" $INSTALL_PACKAGES wget rsync
else
$INSTALL_PACKAGES wget rsync
fi
wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O "$rootdir$EMMC_DIR/functions.sh"
fi
fi
wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O "$rootdir$EMMC_DIR/functions.sh"
if [ ! -f "$rootdir$EMMC_DIR/functions.sh" ]; then
exit 62
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment