```ruby
# update /etc/apt/sources.list at compile time
e = execute "sed -i 's/us.archive.ubuntu.com/ftp.jaist.ac.jp/' /etc/apt/sources.list ; apt-get update" do
  action :nothing
end

e.run_action(:run)
```

Change apt source only if OS is Ubuntu
user
```ruby
# update /etc/apt/sources.list at compile time
case node.platform
when "ubuntu"
  e = execute "sed -i 's/us.archive.ubuntu.com/ftp.jaist.ac.jp/' /etc/apt/sources.list ; apt-get update" do
    action :nothing
  end

  e.run_action(:run)
end
```
assistant