Skip to content

Instantly share code, notes, and snippets.

@cosmo0920
Created March 20, 2012 21:41
Show Gist options
  • Save cosmo0920/2141597 to your computer and use it in GitHub Desktop.
Save cosmo0920/2141597 to your computer and use it in GitHub Desktop.
Rubyからbash実行?
#bashシェルを埋め込んでみた。
#必要なヘッダーが有る時はなにもしないよ
fixshContent=
"#!/usr/bin/env bash\n
cd arch/x86/include/asm/\n
if [ -f unistd_32.h ] ; then
echo 'no need fix.'
else
ln -s ../generated/asm/unistd*.h .\n
fi"
print "creating symlinkfix....\n"
exec("echo #{fixshContent}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment