dep

Package manager for embedded C libraries
git clone git://git.finwo.net/app/dep
Log | Files | Refs | README | LICENSE

commit 09f85ce18de67922f2c0a7ed9cbb695e4411dc7a
parent bbadf735b8e096a47edf89f4b9b8c000fcc848c1
Author: finwo <finwo@pm.me>
Date:   Tue,  5 Nov 2019 21:04:46 +0100

Updated usage

Diffstat:
Mdist/dep | 14++++++++++++--
Mdist/dep-repo | 12++++++++++++
Msrc/dep | 14++++++++++++--
Msrc/dep-repo | 12++++++++++++
4 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/dist/dep b/dist/dep @@ -269,15 +269,25 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. EOF ;; + help) - echo PLEH + echo "Usage: $0 command" + echo "" + echo "Commands:" + echo " help Show this help info" + echo " repo [help] Repository management" + echo " init Initialize the current directory as a dep project" + echo " add <package> Add a dependency" + echo " install [package] Install a package or all project dependencies" + echo "" ;; + *) # Check for user-defined if command -v $0-$1 &>/dev/null; then $0-$1 "${@:2}" else - echo "Usage: $0 (repo|init|add|install|help)" + $0 help exit 1 fi ;; diff --git a/dist/dep-repo b/dist/dep-repo @@ -11,6 +11,18 @@ urlcheck='^(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]$' case "$1" in + help) + echo "Usage: $0 command" + echo "" + echo "Commands:" + echo " help Show this help info" + echo " list List all repositories in use" + echo " add <url> Add a repository" + echo " clean Remove dependency cache" + echo " update Update dependency cache" + echo "" + ;; + list) cat ~/.dep/repositories ;; diff --git a/src/dep b/src/dep @@ -250,15 +250,25 @@ case "$1" in #include "../LICENSE" EOF ;; + help) - echo PLEH + echo "Usage: $0 command" + echo "" + echo "Commands:" + echo " help Show this help info" + echo " repo [help] Repository management" + echo " init Initialize the current directory as a dep project" + echo " add <package> Add a dependency" + echo " install [package] Install a package or all project dependencies" + echo "" ;; + *) # Check for user-defined if command -v $0-$1 &>/dev/null; then $0-$1 "${@:2}" else - echo "Usage: $0 (repo|init|add|install|help)" + $0 help exit 1 fi ;; diff --git a/src/dep-repo b/src/dep-repo @@ -11,6 +11,18 @@ urlcheck='^(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]$' case "$1" in + help) + echo "Usage: $0 command" + echo "" + echo "Commands:" + echo " help Show this help info" + echo " list List all repositories in use" + echo " add <url> Add a repository" + echo " clean Remove dependency cache" + echo " update Update dependency cache" + echo "" + ;; + list) cat ~/.dep/repositories ;;