#!/bin/bash
if [[ $1 == "pkgset" ]] && [[ $2 == "empty" ]]; 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
    rm -rf $GVM_ROOT/pkgs/*
    if [[ $? -ne 0 ]]; then
      echo "ERROR: Could not delete package set files"
      exit 1
    fi
  fi
else
  echo "Please use gvm [action] to call this file"
  exit 1
fi

