#!/bin/sh -ef
# Check for updates

parser_definition() {
    setup REST help:usage -- "usage: ${0##*/} [options]"
    msg -- '' 'Options:'
    flag  download_only -d --download                          -- "Only download updatable packages"
    flag  CPT_FETCH     -n --no-fetch  on:0 off:0 init:@export -- "Do not refresh the repositories"
    disp :pkg_fetch     -o --only-fetch                        -- "Only fetch repositories"
    global_options
}

if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi

create_cache
pkg_updates