diff --git a/.gitignore b/.gitignore index d8590e0..5119921 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ gos/ +packages/ diff --git a/bin/gvm-install b/bin/gvm-install index 537d5af..86272f9 100755 --- a/bin/gvm-install +++ b/bin/gvm-install @@ -9,6 +9,7 @@ if [[ $1 == "install" ]]; then hg clone -u release.r$2 https://go.googlecode.com/hg/ $INSTALL_ROOT > /dev/null 2>&1 echo " * Compiling..." cd $INSTALL_ROOT/src;unset GOROOT;./all.bash > /dev/null 2>&1 + mkdir $GVM_ROOT/packages/go-$2 exit 0 else echo "ERROR: Unknown go release version: '$2'" diff --git a/bin/gvm-package-install b/bin/gvm-package-install index de1f411..bfe12ef 100755 --- a/bin/gvm-package-install +++ b/bin/gvm-package-install @@ -1,6 +1,12 @@ #!/bin/bash if [[ $1 == "package" ]] && [[ $2 == "install" ]]; then - echo "GOOD JOB!" + if [[ -n $4 ]]; then + git clone git@github.com:moovweb/$3 $GVM_ROOT/packages/default/$3-$4 + git checkout $4 + else + echo "ERROR: Please specifiy the version" + exit 1 + fi else echo "Please use gvm [action] to call this file" exit 1 diff --git a/bin/gvm-package-list b/bin/gvm-package-list index 1465617..e465dcf 100755 --- a/bin/gvm-package-list +++ b/bin/gvm-package-list @@ -1,6 +1,6 @@ #!/bin/bash if [[ $1 == "package" ]] && [[ $2 == "list" ]]; then - echo "GOOD JOB!" + ls -1 $GVM_ROOT/packages/default else echo "Please use gvm [action] to call this file" exit 1 diff --git a/bin/gvm-use b/bin/gvm-use index cffe3ed..08d5046 100755 --- a/bin/gvm-use +++ b/bin/gvm-use @@ -3,6 +3,8 @@ if [[ $1 == "use" ]]; then if [[ -n $2 ]]; then rm -f ~/.gvm/gos/default ln -s ~/.gvm/gos/go-$2 ~/.gvm/gos/default + rm -f ~/.gvm/packages/default + ln -s ~/.gvm/packages/go-$2 ~/.gvm/packages/default echo "Now using version $2" exit 0 else diff --git a/scripts/Make.pkg b/scripts/Make.pkg new file mode 100644 index 0000000..8f13040 --- /dev/null +++ b/scripts/Make.pkg @@ -0,0 +1,11 @@ +gvm: all + echo $(pkgdir) + echo _obj/$(TARG).a +# make $(GVM_ROOT)/scripts/Make.pkg all +# +#all: $(INSTALLFILES) +# echo $(INSTALLFILES) +#gvminstall: $(INSTALLFILES) +# ifdef GVM_PACKAGE_INSTALL +# include $(GOROOT)/src/Makeaaa.pkg +# endif diff --git a/scripts/gvm b/scripts/gvm index 74451db..60cfa0b 100644 --- a/scripts/gvm +++ b/scripts/gvm @@ -1,4 +1,5 @@ -export GVM_VERSION=`cat ~/.gvm/VERSION` -export GOROOT=~/.gvm/gos/default -export PATH=$PATH:~/.gvm/bin:~/.gvm/gos/default/bin +export GVM_ROOT=~/.gvm +export GVM_VERSION=`cat $GVM_ROOT/VERSION` +export GOROOT=$GVM_ROOT/gos/default +export PATH=$PATH:$GVM_ROOT/bin:$GVM_ROOT/gos/default/bin