mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Stubbed out functions
This commit is contained in:
commit
da8b5840be
46
README.md
Normal file
46
README.md
Normal file
@ -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
Executable file
98
asdf.sh
Executable file
@ -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 $@
|
Loading…
Reference in New Issue
Block a user