scripts/disk-usage in rvm-1.0.0 vs scripts/disk-usage in rvm-1.0.1
- old
+ new
@@ -3,11 +3,11 @@
#!/usr/bin/env bash
rvm_base_except="selector"
source "$rvm_scripts_path/base"
usage() {
- printf "Usage: 'rvm disk-usage {all,archives,repos,sources,logs,packages}'\n"
+ printf "Usage: 'rvm disk-usage {all,archives,repos,sources,logs,packages,rubies,gemsets}'\n"
printf " Lists the space rvm uses for a given item.\n"
exit 1
}
disk_usage_for_directory() {
@@ -26,10 +26,12 @@
archives_disk_usage
repos_disk_usage
sources_disk_usage
logs_disk_usage
packages_disk_usage
+ rubies_disk_usage
+ gemsets_disk_usage
total_disk_usage
}
total_disk_usage() {
echo "Total Disk Usage: $(disk_usage_for_directory "$rvm_path")"
@@ -38,14 +40,16 @@
archives_disk_usage() { disk_usage "Downloaded Archives" "archives"; }
repos_disk_usage() { disk_usage "Repositories" "repo"; }
sources_disk_usage() { disk_usage "Extracted Source Code" "src"; }
logs_disk_usage() { disk_usage "Log Files" "log"; }
packages_disk_usage() { disk_usage "Packages" "usr"; }
+rubies_disk_usage() { disk_usage "Rubies" "rubies"; }
+gemsets_disk_usage() { disk_usage "Gemsets" "gems"; }
# Exit when there is no argument.
[[ -z "$1" ]] && usage
case "$1" in
- all|archives|repos|sources|logs|total|packages) eval "$1_disk_usage" ;;
+ all|archives|repos|sources|logs|total|packages|rubies|gemsets) eval "$1_disk_usage" ;;
*) usage ;;
esac