Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 15 lines (12 sloc) 0.503 kb
#!/usr/bin/env bash
echo "Snapshotting the current environment gem list into snapshot.gems"
file_name="snapshot.gems"
echo '# system snapshot gemset file' > snapshot.gems
for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | tr ' ' ';') ; do
name="$(echo $gem | awk -F';' '{print $1}')"
versions="$(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g')"
for version in $versions ; do
echo "$name -v$version" >> $file_name
done ; unset version versions
done ; unset file_name
exit $?
Jump to Line
Something went wrong with that request. Please try again.