Sha256: 4e2f0452821d0b9262dee24c319d20962937309a68c30af508a83a7f6dcbd054
Contents?: true
Size: 592 Bytes
Versions: 29
Compression:
Stored size: 592 Bytes
Contents
#!/usr/bin/env bash printf "\nBeginning snapshot of the current environment gem list into snapshot.gems\n" file_name="snapshot.gems" gems=($(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | \tr ' ' ';')) for gem in "${gems[@]}" ; 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 printf "\nCompleted snapshot of the current environment gem list into snapshot.gems\n" exit $?
Version data entries
29 entries across 29 versions & 2 rubygems