Skip to content

Commit

Permalink
Merge pull request #866 from YoeDistro/cbrake/master
Browse files Browse the repository at this point in the history
add yoe_link_downloads_sstate
  • Loading branch information
kraj authored Nov 8, 2023
2 parents b42e3b1 + dcf2655 commit 717b766
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 717b766

Please sign in to comment.