libk  Check-in [50b709b0d3]

Overview
Comment:Remove the $to check entirely and have more output in install.sh Sourcing a file doesn't need it to be executable, so global/common.sh can have it's executable bit removed and the $to check in it entirely removed. Adds some `say`s to install.sh to let you know it did something and help in case of error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | install
Files: files | file ages | folders
SHA3-256: 50b709b0d3f0ffa491155a7ee58b8b4385961356ecb3186665bd096f01496c4a
User & Date: glowpelt on 2020-01-24 21:18:35
Other Links: branch diff | manifest | tags
Context
2020-01-31
06:05
Merge install script branch. Seems to be Good Enough for now, and shouldn't break anything at all to merge this. check-in: 12a51d9c50 user: glowpelt tags: trunk
2020-01-24
21:18
Remove the $to check entirely and have more output in install.sh Sourcing a file doesn't need it to be executable, so global/common.sh can have it's executable bit removed and the $to check in it entirely removed. Adds some `say`s to install.sh to let you know it did something and help in case of error. Closed-Leaf check-in: 50b709b0d3 user: glowpelt tags: install
2020-01-23
07:10
Make install.sh actually try to install. Just a first pass at the problem for now, but it seems to work fine finally with some quick testing. check-in: 6346f60bb6 user: glowpelt tags: install
Changes

Modified global/common.sh from [0a6c6a9052] to [d610091946].

     4      4   check() {
     5      5   	var=$1
     6      6   	test "${!var}" == "" || return 0
     7      7   	say "we were not able to detect a default value for the configuration variable \$$var. please set this variable to $2 and try again."
     8      8   	exit 1
     9      9   }
    10     10   
    11         -#test "$to" = "" && {
    12         -#	say "\$to environment variable must be set to your build directory - are you running this script by hand? run ./build.sh in the root directory instead!"
    13         -#	exit 2
    14         -#}
    15         -
    16     11   reqpack() {
    17     12   	if ! has "$1"; then
    18     13   		say "to $2 for libk, install the $1 package and try again"
    19     14   		exit 3
    20     15   	fi
    21     16   }
    22     17   

Modified install.sh from [ca0001a46e] to [df12302eb0].

    12     12   	sharedir="$prefix/usr/share"
    13     13   	incdir="$prefix/usr/include"
    14     14   else
    15     15   	incdir="$prefix/include"
    16     16   	sharedir="$prefix/share"
    17     17   fi
    18     18   
           19  +say "Starting install."
           20  +
    19     21   # Libraries
    20     22   # These may or may not exist, depending on what library build is done, so check
           23  +say "Installing libraries..."
    21     24   [ -e "$build/libk.a" ] && install -Dm644 -t "$libdir" "$build/libk.a"
    22     25   [ -e "$build/libk.so" ] && install -Dm644 -t "$libdir" "$build/libk.so"
    23     26   [ -e "$build/boot.o" ] && install -Dm644 -t "$libdir/libk" "$build/boot.o"
    24     27   
    25     28   # Binaries
           29  +say "Installing binaries..."
    26     30   install -Dm755 -t "$bindir" "$build/kcore.testbin"
    27     31   install -Dm755 -t "$bindir" "$build/kcli.testbin"
    28     32   install -Dm755 -t "$bindir" "$build/kgraft.attach"
    29     33   
    30     34   # Includes
           35  +say "Installing includes..."
    31     36   for inc in "$build"/k/*; do
    32     37   	install -Dm644 -t "$incdir/k" "$inc"
    33     38   done
    34     39   
    35     40   # Documentation
           41  +say "Installing documentation..."
    36     42   for man in "$build"/doc/man/*; do
    37     43   	install -Dm644 -t "$sharedir/man" "$man"
    38     44   done
    39     45   for html in "$build"/doc/html/*; do
    40     46   	install -Dm644 -t "$sharedir/doc/libk/html" "$html"
    41     47   done
    42     48   for pdf in "$build"/doc/pdf/*; do
    43     49   	install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
    44     50   done
           51  +say "Install done!"