From 92de4ab1d7bf2069ec1ddb8994ad1e1a0d6efdaf Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Mon, 13 Feb 2023 21:43:23 +0600 Subject: [PATCH] fixes and default .gitignore --- .gitignore | 16 ++++++++++++++++ CHANGELOG.md | 5 +++++ default_tasks/clean.sh | 2 ++ functions.sh | 2 +- setup.sh | 4 ++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4be6400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# build results +bin/ +obj/ +*.log +*.tmp + +# IDE files +.vs/ +.vshistory/ +.editorconfig +*.user +*.vcxproj.filters + +# other files +.old*/ +current.config diff --git a/CHANGELOG.md b/CHANGELOG.md index d9a154e..3a3f3e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,3 +11,8 @@ + added makefile task fix_log + new comments in scripts and Makefile + wrapped arguments with quots in scripts ++ now u should add CPP_ARGS to LINKER_ARGS manually ++ added error(msg) function to functions.sh ++ replaced printf calls with myprint in scripts ++ added default .gitignore ++ added *.log to .gitignore diff --git a/default_tasks/clean.sh b/default_tasks/clean.sh index d948327..0e5696e 100644 --- a/default_tasks/clean.sh +++ b/default_tasks/clean.sh @@ -2,3 +2,5 @@ delete_dir "$OBJDIR" delete_dir "$OUTDIR" +myprint "${WHITE}deleting build logs" +rm -rf *.log diff --git a/functions.sh b/functions.sh index 769f324..2d28d25 100755 --- a/functions.sh +++ b/functions.sh @@ -92,7 +92,7 @@ $(find $OBJDIR/libs -name '*.a')" # (outfile) function pack_static_lib { myprint "${CYAN}----------[pack_static_lib]-----------" - local outfile="$OUTDIR/$1" + local outfile="$1" myprint "${BLUE}outfile: ${GRAY}$outfile" local objects="$(find $OBJDIR/objects -name *.o) $(find $OBJDIR/libs -name '*.a')" diff --git a/setup.sh b/setup.sh index ba7a9b0..921a1c1 100644 --- a/setup.sh +++ b/setup.sh @@ -26,3 +26,7 @@ esac cp cbuild/default.Makefile Makefile cp cbuild/default.config ./ + +echo "copy default .gitignore? [y/any]" +read answ +[[ "$answ"="y" ]] && cp cbuild/.gitignore ./