Skip to content

Instantly share code, notes, and snippets.

@unixc3t
Created December 27, 2018 02:32
Show Gist options
  • Save unixc3t/fe327befcbd6054ac5b946ffebb6389e to your computer and use it in GitHub Desktop.
Save unixc3t/fe327befcbd6054ac5b946ffebb6389e to your computer and use it in GitHub Desktop.
get installed gems
#!/bin/bash
if [ ! -f "gems.sh" ];then
touch "gems.sh"
echo "#!/bin/bash" >> gems.sh
fi
temp=123
for i in $(ls '.'); do
if [ ${i} != $(basename ${0}) ] && [ ${i} != gems.sh ];then
a=${i%-*}
if [ ${a} != ${temp} ];then
temp=${a}
echo "gem install ${a}" >> gems.sh
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment