diff --git a/cookbooks/base/default.rb b/cookbooks/base/default.rb index 7c1175a..a20739c 100644 --- a/cookbooks/base/default.rb +++ b/cookbooks/base/default.rb @@ -63,6 +63,9 @@ include_recipe './mc.rb' # Install lsyncd command: include_recipe './lsyncd.rb' +# Install starship command: +include_recipe './starship.rb' + # recipes for Ubuntu 16.04 if node['platform_version'].to_f == 16.04 # ntp configurations diff --git a/cookbooks/base/starship.rb b/cookbooks/base/starship.rb new file mode 100644 index 0000000..d5812eb --- /dev/null +++ b/cookbooks/base/starship.rb @@ -0,0 +1,14 @@ +# インストールスクリプトのダウンロード +execute 'wget -O /tmp/starship-install.sh https://starship.rs/install.sh' do + not_if 'test -e /usr/local/bin/starship' +end + +execute 'chmod +x /tmp/starship-install.sh' do + not_if 'test -e /usr/local/bin/starship' +end + +execute '/tmp/starship-install.sh -y' do + user 'root' + + not_if 'test -e /usr/local/bin/starship' +end