clean func
This commit is contained in:
parent
2bebe76c7e
commit
e83a7affef
@ -4,6 +4,7 @@
|
||||
+ default C++ standard set to `c++11`
|
||||
+ added `INCLUDE` to `default.config`
|
||||
+ 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
|
||||
+ added task `clean`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
delete_dir "$OBJDIR"
|
||||
delete_dir "$OUTDIR"
|
||||
try_delete_dir_or_file "$OBJDIR"
|
||||
try_delete_dir_or_file "$OUTDIR"
|
||||
myprint "${WHITE}deleting build logs"
|
||||
rm -rf *.log
|
||||
|
||||
@ -22,6 +22,14 @@ function delete_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 {
|
||||
local cmp="$1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user