clean func
This commit is contained in:
parent
2bebe76c7e
commit
e83a7affef
@ -4,6 +4,7 @@
|
|||||||
+ default C++ standard set to `c++11`
|
+ default C++ standard set to `c++11`
|
||||||
+ added `INCLUDE` to `default.config`
|
+ added `INCLUDE` to `default.config`
|
||||||
+ moved `LINKER_ARGS` to the end of linkage command in `functions.sh` to properly link static libs
|
+ moved `LINKER_ARGS` to the end of linkage command in `functions.sh` to properly link static libs
|
||||||
|
+ added function `try_delete_dir_or_file` for `clean` task
|
||||||
|
|
||||||
# v5
|
# v5
|
||||||
+ added task `clean`
|
+ added task `clean`
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
delete_dir "$OBJDIR"
|
try_delete_dir_or_file "$OBJDIR"
|
||||||
delete_dir "$OUTDIR"
|
try_delete_dir_or_file "$OUTDIR"
|
||||||
myprint "${WHITE}deleting build logs"
|
myprint "${WHITE}deleting build logs"
|
||||||
rm -rf *.log
|
rm -rf *.log
|
||||||
|
|||||||
@ -22,6 +22,14 @@ function delete_dir {
|
|||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function try_delete_dir_or_file {
|
||||||
|
local path="$1"
|
||||||
|
if [ -f "$path" ] || [ -d "$path" ]; then
|
||||||
|
rm -rf "$path"
|
||||||
|
myprint "${WHITE}deleting $path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function compile {
|
function compile {
|
||||||
local cmp="$1"
|
local cmp="$1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user