From 27e9ade7bceaf0c4cfbe1bad308a5172ee801bd5 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 4 Jul 2020 02:16:16 +0100 Subject: Some command line messages of ./project didn't mention shell Until now, the 'shell' mode of the './project' script was missing in the top output of './project --help' and in the error message printed when no operation was given, or when more than one operation was given. This is now corrected. --- project | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'project') diff --git a/project b/project index 916dc33..cdd0976 100755 --- a/project +++ b/project @@ -71,6 +71,7 @@ print_help() { # Print the output. cat < Date: Thu, 13 Aug 2020 17:33:00 +0100 Subject: --check-config option now prints names of last 5 installed Until now, './project --check-config' would only print the names of the software that were being built. Besides that, it is also useful to know which packages have most recently finished. With this commit, we now print the last 5 built software packages with '--check-config' also, and the output has also been placed in a row of '='s to help separate it in each round. Also some more sanity checks have been added so it doesn't print error messages. --- project | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) (limited to 'project') diff --git a/project b/project index cdd0976..7368151 100755 --- a/project +++ b/project @@ -248,11 +248,62 @@ being built. EOF - # Run the infinite loop. + # Run the infinite loop. To be able to find the last built programs, we + # need to put all the Python programs and high-level program into one + # directory. + checkdir=.local/version-info/.for-check-config while true; do + + # Make sure the '.build' directory has already been created. echo; - echo "$(date) [[press CTRL-C to stop]]"; - ls $coloropt .build/software/build-tmp || junk=1; + echo "========================" + if [ -d .build ]; then + echo "$(date) [[press CTRL-C to stop]]"; + echo "--- Currently being built:" + if [ -d .build/software/build-tmp ]; then + ls $coloropt .build/software/build-tmp || junk=1; + fi + + # Make the temporary directory, delete its contents, then put new + # links of all built software. + if ! [ -d $checkdir ]; then mkdir $checkdir; fi + rm -f $checkdir/* + + # Check if any programs exist in the given directory yet. + printresults=0 + check=$(ls .local/version-info/python/) + if ! [ "x$check" = x ]; then + printresults=1 + ln -s .local/version-info/python/* $checkdir/ + fi + check=$(ls .local/version-info/proglib/) + if ! [ "x$check" = x ]; then + printresults=1 + ln -s $(pwd)/.local/version-info/proglib/* $checkdir/ + fi + + # If something was actually found, then print them. + if [ $printresults = 1 ]; then + echo "--- Last 5 packages that were built:" + + # Then sort all the links based on the most recent dates of the + # files they link to (with '-L'). + ls -Llt $checkdir \ + | awk '/^-/ && c++<5 {printf "[at %s] %s\n", $(NF-1), $NF}' + fi + else + cat <