Skip to content

Commit

Permalink
add yoe_link_downloads_sstate
Browse files Browse the repository at this point in the history
Signed-off-by: Cliff Brake <[email protected]>
  • Loading branch information
cbrake committed Nov 7, 2023
1 parent b42e3b1 commit dcf2655
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -747,3 +747,29 @@ yoe_create_tap_devices() {
fi
sudo ${OE_BASE}/sources/poky/scripts/runqemu-gen-tapdevs `id -g` `nproc --all`
}

# link downloads and sstate directory to some common location
# it is often best if a relative directory is used for this
yoe_link_downloads_sstate() {
DIR=$1

if [ -z "$1" ]; then
echo "Must specify destination directory"
fi

if [ -e downloads ]; then
rm -rf downloads
fi

ln -sf $DIR/downloads downloads

if [[ $DIR == *".." ]]; then
DIR=$DIR/..
fi

if [ -e build/sstate-cache ]; then
rm -rf build/sstate-cache
fi

ln -sf $DIR/sstate-cache build/sstate-cache
}

0 comments on commit dcf2655

Please sign in to comment.