Sha256: 771425cc9207ff896a333b837ec7c5d5e0cb2b2f30acb82e5df5fd624fb58ff7
Contents?: true
Size: 1.3 KB
Versions: 23
Compression:
Stored size: 1.3 KB
Contents
#!/usr/bin/env bash rvm_base_except="selector" source "$rvm_path/scripts/base" source "$rvm_path/scripts/patches" lookup_patchset() { local paths lookup_path if [[ -z "$1" ]]; then echo "Usage: rvm patchset show name" return 1 fi paths=($(__rvm_ruby_string_paths_under "$rvm_path/patchsets")) for lookup_path in "${paths[@]}" ; do if [[ -s "$lookup_path/$1" ]]; then cat "$lookup_path/$1" return 0 fi done return 1 } # Return the full patch for a given patch. __rvm_lookup_full_patch_path() { local directory directories extension patch_path directories=($(__rvm_patch_lookup_path)) # Absolute path, pwd and then finally the rvm patches path. for directory in "${directories[@]}" ; do for extension in {"",.patch,.diff}; do patch_path="${directory}${1}${extension}" if [[ -s "$patch_path" ]]; then echo "$patch_path" return fi done done return 1 } usage() { printf " Usage: rvm patchset {show,lookup} [patchset] Description: Tools for manipulating patchsets. " return 1 } args=($*) action="${args[0]}" patchset="${args[1]}" args="$(echo ${args[@]:2}) " # Strip trailing / leading / extra spacing. case "$action" in show|lookup) lookup_patchset "$patchset" ;; *) usage ;; esac exit $?
Version data entries
23 entries across 23 versions & 2 rubygems