# Gentoo update script

Tags: linux gentoo

Reading time: 1 minute

Description: A simple update script to sync the repository and update installed packages






# Security

Set the permissions of this script to 700 (-rwx------ aka only usable by root), we dont want a random user to change it’s contents, since it needs to be executed as root ;)

1
chmod 700 update.sh

1
2
3
4
5
6
7
8
#!/bin/sh

if [ "$1" != "--nosync" ]
then
  emaint -a sync
fi

emerge -uDavN @world