Check-in [a664b039b7]
Overview
Comment:Updated to support a "-lib" option to the "install" command of "appfs-cache"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a664b039b70e17cf68cc7966309550ca9f07a34a
User & Date: rkeene on 2017-12-15 05:31:45
Other Links: manifest | tags
Context
2017-12-15
05:32
Some docker updates check-in: 9d8f6caf41 user: rkeene tags: trunk
05:31
Updated to support a "-lib" option to the "install" command of "appfs-cache" check-in: a664b039b7 user: rkeene tags: trunk
05:31
Set default negative ttl to the same as the positive ttl check-in: b075183fad user: rkeene tags: trunk
Changes

Modified appfs-cache from [28b85c645c] to [c1af76ad48].

    91     91   	call_appfsd --tcl 'file delete -force -- {*}[glob -directory $::appfs::cachedir {[0-9a-f][0-9a-f]}]' || return 1
    92     92   	call_appfsd --sqlite3 'DELETE FROM sites; DELETE FROM packages; DELETE FROM files; VACUUM;' || return 1
    93     93   }
    94     94   
    95     95   function install() {
    96     96   	local site packages
    97     97   	local package packagedir
           98  +	local includeLib
           99  +
          100  +	includeLib='0'
          101  +	if [ "$1" = '-lib' ]; then
          102  +		shift
          103  +		includeLib='1'
          104  +	fi
    98    105   
    99    106   	site="$1"
   100    107   	shift
   101    108   
   102    109   	packages=("$@")
   103    110   
   104    111   	if [ -z "${site}" -o -z "${packages[*]}" ]; then
................................................................................
   107    114   		return 1
   108    115   	fi
   109    116   
   110    117   	for package in "${packages[@]}"; do
   111    118   		packagedir="/opt/appfs/${site}/${package}/platform/latest"
   112    119   
   113    120   		## XXX:TODO: Allow installation to other locations
   114         -		ln -s "${packagedir}"/bin/* /bin/
          121  +		ln -fs "${packagedir}"/bin/* /bin/
          122  +		if [ "${includeLib}" = '1' ]; then
          123  +			ln -fs "${packagedir}"/lib/* /lib/
          124  +		fi
   115    125   	done
   116    126   
   117    127   	return 0
   118    128   }
   119    129   
   120    130   case "$1" in
   121    131   	install)
   122    132   		shift
   123    133   		install "$@" || exit 1
          134  +		exit 0
   124    135   		;;
   125    136   	invalidate)
   126    137   		invalidate || exit 1
   127    138   		;;
   128    139   	remove-site)
   129    140   		remove_site "$2" || exit 1
   130    141   		;;