mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-04-19 12:57:16 +00:00
build.sh: cleanup /var/lib symlink before build
This commit is contained in:
parent
a051dabe09
commit
fcf5807caa
9
build.sh
9
build.sh
@ -66,6 +66,13 @@ if ! [ -f $basedir/configs/${board}_defconfig ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function prepare_target_dir() {
|
||||
if [ -L $outputdir/target/var/lib ]; then
|
||||
rm $outputdir/target/var/lib
|
||||
mkdir $outputdir/target/var/lib
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p $outputdir
|
||||
|
||||
if ! [ -f $outputdir/.config ]; then
|
||||
@ -135,9 +142,11 @@ elif [[ "$target" == initramfs* ]]; then
|
||||
fi
|
||||
|
||||
elif [ "$target" == "all" ]; then
|
||||
prepare_target_dir
|
||||
make O=$outputdir all
|
||||
|
||||
elif [ -n "$target" ]; then
|
||||
prepare_target_dir
|
||||
make O=$outputdir $target
|
||||
|
||||
else # if [ -z "$target ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user