Sha256: f148fa3bca29e6b3b938f33bffa18c5af27036973c225cd68432e091bffbc56e
Contents?: true
Size: 868 Bytes
Versions: 4
Compression:
Stored size: 868 Bytes
Contents
#!/usr/bin/env bash rvm_base_except="selector" source "$rvm_scripts_path/base" usage() { printf "Usage: 'rvm cleanup {all,archives,repos,sources,logs}'\n" printf " Cleans up the directory tree for the specified item.\n" exit 1 } cleanup() { for cleanup_type in $1; do eval "current_path=\"\$rvm_${cleanup_type}_path\"" if [[ -n "$current_path" && -d "$current_path" && "$current_path" != "/" ]]; then $rvm_scripts_path/log "info" "Cleaning up rvm directory '$current_path'" \rm -rf "$current_path"/* >/dev/null 2>&1 fi done; unset cleanup_type current_path } # Exit when there is no argument. [[ -z "$1" ]] && usage case "$1" in all) cleanup "archives repo src log" ;; archives) cleanup "archives" ;; repos) cleanup "repo" ;; sources) cleanup "src" ;; logs) cleanup "log" ;; *) usage ;; esac
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rvm-1.0.1 | scripts/cleanup |
rvm-1.0.0 | scripts/cleanup |
rvm-0.1.47 | scripts/cleanup |
rvm-0.1.46 | scripts/cleanup |