Permalink
Browse files

Stubbed out functions

  • Loading branch information...
HashNuke committed Sep 29, 2014
0 parents commit da8b5840be369b8bd621c70d3c69b312e941132a
Showing with 144 additions and 0 deletions.
  1. +46 −0 README.md
  2. +98 −0 asdf.sh
@@ -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
98 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 <name> <source>
# source remove <name>
#
# package install
# package list <version>
# package uninstall
# versions package
# versions package --all
# use
}
# # install <package> <version>
# install_command() {
# }
#
#
# # uninstall_command <package> <version>
# uninstall_command() {
# }
#
#
# # list
# list_packages_command() {
# }
#
#
# # list <package>
# list_all_versions_command() {
# }
#
#
# # list <package>
# list_installed_versions_command() {
# }
#
#
# # add <package> <source>
# # source can be username/repo got GitHub or full git url
# add_package_command() {
# }
#
#
# # use <package> <version>
# 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 $@

0 comments on commit da8b584

Please sign in to comment.