diff options
| author | Fuwn <[email protected]> | 2021-06-23 20:25:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-23 20:26:25 -0700 |
| commit | 5fd04f4c035b79c099ec825c035be8a0f8bad2cf (patch) | |
| tree | fcebcd26c9fe00817aee673ddd6c41c3b1b5ca3d /bin/base_box_optimizations.sh | |
| parent | revert(fmt): error on unformatted (diff) | |
| download | whirl-5fd04f4c035b79c099ec825c035be8a0f8bad2cf.tar.xz whirl-5fd04f4c035b79c099ec825c035be8a0f8bad2cf.zip | |
ci(vagrant): setup (incomplete)
Diffstat (limited to 'bin/base_box_optimizations.sh')
| -rw-r--r-- | bin/base_box_optimizations.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/base_box_optimizations.sh b/bin/base_box_optimizations.sh new file mode 100644 index 0000000..0d595cb --- /dev/null +++ b/bin/base_box_optimizations.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Exit the script if the executor is not root +if [[ $EUID -ne 0 ]]; then + cat <<END +you need to run this script as root +use :privileged => true in Vagrantfile +END + + exit 0 +fi + +# Optimize APT sources for fastest mirror +perl -pi -e 's@^\s*(deb(\-src)?)\s+http://us.archive.*?\s+@\1 mirror://mirrors.ubuntu.com/mirrors.txt @g' /etc/apt/sources.list + +# Update repositories +apt-get update |