scripts: cleanup git tree only when one exists
This commit is contained in:
parent
06a8b728cd
commit
73ecb78bc6
1 changed files with 4 additions and 2 deletions
|
|
@ -44,8 +44,10 @@ cleanup() {
|
||||||
# In cases where anbox comes directly from a checked out Android
|
# In cases where anbox comes directly from a checked out Android
|
||||||
# build environment we miss some symlinks which are present on
|
# build environment we miss some symlinks which are present on
|
||||||
# the host and don't have a valid git repository in that case.
|
# the host and don't have a valid git repository in that case.
|
||||||
git clean -fdx . || true
|
if [ -d .git ] ; then
|
||||||
git reset --hard || true
|
git clean -fdx .
|
||||||
|
git reset --hard
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue