mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
21 lines
877 B
Bash
Executable File
21 lines
877 B
Bash
Executable File
#!/bin/bash
|
|
. $GVM_ROOT/scripts/functions
|
|
|
|
[[ $1 != "" ]] ||
|
|
display_error "Please specifiy the name"
|
|
|
|
[[ ! -f "$GVM_ROOT/environments/$gvm_go_name@$1" ]] ||
|
|
display_error "Packageset already exists!"
|
|
|
|
mkdir -p $GVM_ROOT/pkgsets/$gvm_go_name/$1 ||
|
|
display_error "Could not create folder"
|
|
cp $GVM_ROOT/environments/$gvm_go_name $GVM_ROOT/environments/$gvm_go_name@$1 ||
|
|
display_error "Could copy environment"
|
|
echo "export gvm_pkgset_name=\"$1\"" >> $GVM_ROOT/environments/$gvm_go_name@$1 ||
|
|
display_error "Could not extend environment"
|
|
echo "export GOPATH; GOPATH=\"$GVM_ROOT/pkgsets/release.r60.3/$1:\$GOPATH\"" >> $GVM_ROOT/environments/$gvm_go_name@$1 ||
|
|
display_error "Could not extend environment"
|
|
echo "export PATH; PATH=\"$GVM_ROOT/pkgsets/release.r60.3/$1/bin:\$PATH\"" >> $GVM_ROOT/environments/$gvm_go_name@$1 ||
|
|
display_error "Could not extend environment"
|
|
|