From da8b5840be369b8bd621c70d3c69b312e941132a Mon Sep 17 00:00:00 2001 From: Akash Manohar J Date: Mon, 29 Sep 2014 22:21:09 +0530 Subject: [PATCH] Stubbed out functions --- README.md | 46 ++++++++++++++++++++++++++ asdf.sh | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 README.md create mode 100755 asdf.sh diff --git a/README.md b/README.md new file mode 100644 index 00000000..5115016e --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# asdf version manager + +> for everything that needs a version manager + + +## Commands + +#### Install verison 1.2.3 of xyz + +``` +asdf install xyz 1.2.3 +``` + +#### Uninstall version 1.2.3 of xyz + +``` +asdf uninstall xyz 1.2.3 +``` + +#### List installed versions of xyz + +``` +asdf list xyz +``` + +#### List all available versions of xyz + +``` +asdf list xyz --all +``` + +#### Add a tool + +``` +asdf add elixir HashNuke/asdf-elixir +``` + +#### List all tool sources added + +``` +asdf list +``` + +#### + +asdf depend elixir 1.0.0 on java 1.0 diff --git a/asdf.sh b/asdf.sh new file mode 100755 index 00000000..91ccfa99 --- /dev/null +++ b/asdf.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env sh + +#TODO run command with args + +#TODO decide which function to run based on args + +ASDF_DIR=$(dirname $0) + +run_command () { + echo $1 + echo $2 + # help + # + # source + # source add + # source remove + # + # package install + # package list + # package uninstall + # versions package + # versions package --all + # use +} + + +# # install +# install_command() { +# } +# +# +# # uninstall_command +# uninstall_command() { +# } +# +# +# # list +# list_packages_command() { +# } +# +# +# # list +# list_all_versions_command() { +# } +# +# +# # list +# list_installed_versions_command() { +# } +# +# +# # add +# # source can be username/repo got GitHub or full git url +# add_package_command() { +# } +# +# +# # use +# use_command() { +# } + + +# --help or help +# help_command { +# } + + +#### Private functions + +# read_action_script() { +# +# } +# +# run_install_script() { +# +# } +# +# run_uninstall_script() { +# +# } + +clone_git_repo() { + git clone $2 $ASDF_DIR/sources/$1 +} + +clone_github_repo() { + git clone https://github.com/$2 $ASDF_DIR/sources/$1 +} + + +# check if package source dir has proper format. if no delete it +# verify_package_source() { +# +# } + +#### + +run_command $@