Check-in [8998f05e2e]
Overview
Comment:Added an "install" command for setting up symlinks to binaries
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8998f05e2e99d7c27f7c5e20547aae255bf4e218
User & Date: rkeene on 2017-10-30 18:03:48
Other Links: manifest | tags
Context
2017-12-15
05:31
Set default negative ttl to the same as the positive ttl check-in: b075183fad user: rkeene tags: trunk
2017-10-30
18:03
Added an "install" command for setting up symlinks to binaries check-in: 8998f05e2e user: rkeene tags: trunk
18:03
Added start of docker init code check-in: 2d83a6231c user: rkeene tags: trunk
Changes

Modified appfs-cache from [74cf59f6d3] to [28b85c645c].

    87     87   
    88     88   		return 1
    89     89   	fi
    90     90   
    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  +
           95  +function install() {
           96  +	local site packages
           97  +	local package packagedir
           98  +
           99  +	site="$1"
          100  +	shift
          101  +
          102  +	packages=("$@")
          103  +
          104  +	if [ -z "${site}" -o -z "${packages[*]}" ]; then
          105  +		echo "usage: appfs-cache install <site> <package>..." >&2
          106  +
          107  +		return 1
          108  +	fi
          109  +
          110  +	for package in "${packages[@]}"; do
          111  +		packagedir="/opt/appfs/${site}/${package}/platform/latest"
          112  +
          113  +		## XXX:TODO: Allow installation to other locations
          114  +		ln -s "${packagedir}"/bin/* /bin/
          115  +	done
          116  +
          117  +	return 0
          118  +}
    94    119   
    95    120   case "$1" in
          121  +	install)
          122  +		shift
          123  +		install "$@" || exit 1
          124  +		;;
    96    125   	invalidate)
    97    126   		invalidate || exit 1
    98    127   		;;
    99    128   	remove-site)
   100    129   		remove_site "$2" || exit 1
   101    130   		;;
   102    131   	clean)