mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-10 21:36:40 +10:00
24 lines
533 B
Bash
Executable File
24 lines
533 B
Bash
Executable File
#!/bin/bash
|
|
if [[ $1 == "pkgset" ]] && [[ $2 == "create" ]]; then
|
|
if [[ -n $3 ]]; then
|
|
CUR_VER=`readlink $GVM_ROOT/go | awk '{ n=split($1,path,"/"); print path[n] }'`
|
|
if [[ $CUR_VER == "" ]]; then
|
|
echo "ERROR: No Go version selected"
|
|
exit 1
|
|
else
|
|
mkdir -p $GVM_ROOT/pkgsets/$CUR_VER/$3
|
|
if [[ $? -ne 0 ]]; then
|
|
echo "ERROR: Could not create folder"
|
|
exit 1
|
|
fi
|
|
fi
|
|
else
|
|
echo "ERROR: Please specifiy the name"
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Please use gvm [action] to call this file"
|
|
exit 1
|
|
fi
|
|
|