Sha256: 165e49a1c557542d3554042da906897781c4e8f1195df42b8d822a748f4356b2

Contents?: true

Size: 979 Bytes

Versions: 152

Compression:

Stored size: 979 Bytes

Contents

function bundle_clean() {
  ruby_version="$(ruby -v | grep -o '[0-9]\.[0-9]\.[0-9]')"

  if [ -d vendor/bundle ]; then
    chmod og+r -R vendor/bundle # some gems have broken perms

    # some cleanup
    rm -rf vendor/bundle/ruby/${ruby_version}/cache
    rm -rf vendor/bundle/ruby/${ruby_version}/gems/*/{test,spec,examples,example,contrib,doc,ext,sample}
  fi
}

# Remove files from the current directory that also exist in another given
# directory. For example, say in the current directory there is:
#    foo
#    bar/baz
#    bar/xyzzy
#    bacon
#    people/phlebas
# and in dir2 there is
#    bacon
#    alice
#    people/phlebas
#    bar/xyzzy
# then after running `remove_matching dir2` current directory will be left with only:
#    foo
#    bar/baz
# Note it probably isn't 100% fool-proof, so don't launch it out to space or something.
function remove_matching() {
  find "$1" -type f -print0 | sed -ze "s@^$1@.@" | xargs -0 rm -f
  find . -type d -empty -delete
}

Version data entries

152 entries across 152 versions & 1 rubygems

Version Path
conjur-debify-3.0.2.pre.1906 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1905 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1899 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1898 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1896 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1894 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1893 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1891 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1890 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1888 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1886 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1884 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1882 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1880 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1878 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1875 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1873 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1871 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1868 lib/conjur/fpm/debify_utils.sh
conjur-debify-3.0.2.pre.1866 lib/conjur/fpm/debify_utils.sh