From a42048cc7d446d4b4b6c5aca796f3635d7b70f21 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 7 Aug 2022 18:18:36 +0900 Subject: [PATCH] Install `starship`. --- cookbooks/base/default.rb | 3 +++ cookbooks/base/starship.rb | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 cookbooks/base/starship.rb 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