diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-08-17 00:28:08 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-08-20 02:00:32 +0100 |
commit | 3480a74b077f599389fd54a453791a0373568171 (patch) | |
tree | 76e472534d729301ad480e3777c91a7c24a5d331 /project | |
parent | b79c430c82b6c3a40817caac13bf8665cfa9c6a3 (diff) | |
parent | 9573d4e4d4754e629b73be4bd6846a049d57f427 (diff) |
Imported recent updates in Maneage, minor conflicts fixed
Some very minor conflicts came up and were easily corrected. They were
mostly in parts that are also shared with the demonstration in the core
Maneage branch.
Diffstat (limited to 'project')
-rwxr-xr-x | project | 62 |
1 files changed, 57 insertions, 5 deletions
@@ -71,6 +71,7 @@ print_help() { # Print the output. cat <<EOF Usage: $scriptname configure [OPTIONS] + $scriptname shell [OPTIONS] $scriptname make [OPTIONS] Top-level script to manage the reproducible project. The high-level @@ -151,7 +152,7 @@ func_operation_set() { if [ x$operation = x ]; then operation=$1 else - echo "Only one operation ('configure' or 'make') may be given." + echo "Only one operation ('configure', 'make' or 'shell') may be given." exit 1 fi } @@ -247,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 <<EOF +The connection to the build directory (.build) is not yet created. + +If you have just ran './project configure', it should be created and will +be used in a few seconds to report the build status of various software. +If not, please run './project configure' (in another terminal) and you will +see the results shortly afterwards. +EOF + fi + echo "========================" + + # Wait for the next round of checks. sleep 1; done exit 0 @@ -480,7 +532,7 @@ case $operation in No operation defined! Please run with '--help' for more information. -(TIP: available operations are: 'configure' or 'make'). +(TIP: available operations are: 'configure', 'make', or 'shell'). EOF exit 1 |