From 0b444ad44589ae3be9b3c16f4810c61ace063887 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 28 Apr 2021 09:32:02 +0200 Subject: [PATCH] Make provisioning scripts run in unprivileged mode + more (#17) * Make provisioning scripts run in unprivileged mode + more * Move install-vscode to home To declutter the Desktop and avoid users just randomly clicking on it * Enable object files clean-up by default * Format files (mostly endlines) * install-su2.sh: group echo commands (shellcheck) * Move the cleanup objects step to post-install * Move cleanup steps to cleanup.sh --- README.md | 7 +++- Vagrantfile | 29 +++++++------ provisioning/cleanup.sh | 8 ++++ provisioning/get-started.desktop | 6 +++ provisioning/install-basics.sh | 16 +++----- provisioning/install-calculix.sh | 21 +++++----- provisioning/install-config-visualizer.sh | 14 +++---- provisioning/install-dealii.sh | 22 ++++------ provisioning/install-devel.sh | 6 +-- provisioning/install-fenics.sh | 16 +++----- provisioning/install-nutils.sh | 6 +-- provisioning/install-openfoam.sh | 21 +++++----- provisioning/install-paraview.sh | 13 +++--- provisioning/install-precice.sh | 50 +++++++++++------------ provisioning/install-su2.sh | 46 +++++++++++++-------- provisioning/install-vscode.sh | 2 +- provisioning/post-install.sh | 9 +--- 17 files changed, 150 insertions(+), 142 deletions(-) create mode 100644 provisioning/cleanup.sh create mode 100755 provisioning/get-started.desktop diff --git a/README.md b/README.md index 7163797..4413045 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Ready-to-use boxes are available on [Vagrant Cloud](https://app.vagrantup.com/pr You can afterwards also see and manage the produced VM in VirtualBox. A few things you may need: + - The username and password are `vagrant`/`vagrant` - The keyboard layout is US English (QWERTY). You can change this in [`install-basics.sh`](./install-basics.sh) or through the keyboard setting shortcut on `~/Desktop`. - Find scripts to install additional software on `~/Desktop/shared`. @@ -40,6 +41,7 @@ A few things you may need: ## What is included? This box is based on the [bento/ubuntu-20.04](https://github.com/chef/bento/blob/master/packer_templates/ubuntu/ubuntu-20.04-amd64.json) base box and installs: + - Xubuntu-core (Xfce desktop environment) and related tools - VirtualBox guest additions - Terminator (a nice split-window terminal emulator, find it in `Applications > System`) @@ -49,14 +51,15 @@ This box is based on the [bento/ubuntu-20.04](https://github.com/chef/bento/blob - preCICE config visualizer latest from the master branch - preCICE Python bindings - OpenFOAM v2012 and the OpenFOAM-preCICE adapter -- deal.II 9.2 from the official backports and the deal.II-preCICE adapter (you still need to copy the compiled executables wherever you need them) +- deal.II 9.2 from the official backports and the deal.II-preCICE adapter - CalculiX 2.16 from source and the CalculiX-preCICE adapter - FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter - Nutils latest from PIP - SU2 6.0.0 and the SU2-preCICE adapter from source - Paraview from the official binaries -It then adds on the `/home/vagrant/Desktop`: +It then adds on the `/home/vagrant/`: + - The preCICE examples (solverdummies), including a copy of the Python solverdummy. - The preCICE tutorials from the `precice/tutorials` diff --git a/Vagrantfile b/Vagrantfile index e2b11a5..9dadf78 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -26,32 +26,35 @@ Vagrant.configure("2") do |config| end # Install a desktop environment and basic tools - config.vm.provision "shell", path: "provisioning/install-basics.sh" + config.vm.provision "shell", path: "provisioning/install-basics.sh", privileged: false # Install common development tools - config.vm.provision "shell", path: "provisioning/install-devel.sh" + config.vm.provision "shell", path: "provisioning/install-devel.sh", privileged: false # Install preCICE - config.vm.provision "shell", path: "provisioning/install-precice.sh" + config.vm.provision "shell", path: "provisioning/install-precice.sh", privileged: false # Install solvers, adapters, and related tools - config.vm.provision "shell", path: "provisioning/install-config-visualizer.sh" - config.vm.provision "shell", path: "provisioning/install-openfoam.sh" - config.vm.provision "shell", path: "provisioning/install-dealii.sh" - config.vm.provision "shell", path: "provisioning/install-calculix.sh" - config.vm.provision "shell", path: "provisioning/install-fenics.sh" - config.vm.provision "shell", path: "provisioning/install-nutils.sh" - config.vm.provision "shell", path: "provisioning/install-su2.sh" - config.vm.provision "shell", path: "provisioning/install-paraview.sh" + config.vm.provision "shell", path: "provisioning/install-config-visualizer.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-dealii.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-calculix.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-fenics.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-nutils.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false # Post-installation steps - config.vm.provision "shell", path: "provisioning/post-install.sh" - config.vm.provision "file", source: "provisioning/install-vscode.sh", destination: "~/Desktop/install-vscode.sh" + config.vm.provision "shell", path: "provisioning/post-install.sh", privileged: false + config.vm.provision "file", source: "provisioning/install-vscode.sh", destination: "~/install-vscode.sh" + config.vm.provision "file", source: "provisioning/get-started.desktop", destination: "~/Desktop/get-started.desktop" # Pre-packaging steps + # config.vm.provision "shell", path: "provisioning/cleanup.sh", privileged: false # Add the default Vagrant insecure public key to the authorized keys config.vm.provision "file", source: "provisioning/vagrant.pub", destination: "~/.ssh/vagrant.pub" config.vm.provision "shell", inline: <<-SHELL cat /home/vagrant/.ssh/vagrant.pub >> /home/vagrant/.ssh/authorized_keys SHELL + end diff --git a/provisioning/cleanup.sh b/provisioning/cleanup.sh new file mode 100644 index 0000000..bbc69eb --- /dev/null +++ b/provisioning/cleanup.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -ex + +# Cleanup the APT cache to save space +sudo apt-get clean + +# Cleanup all object files from compilation +find /home/vagrant/ -type f -name '*.o' -exec rm -fv {} \; diff --git a/provisioning/get-started.desktop b/provisioning/get-started.desktop new file mode 100755 index 0000000..c00d80a --- /dev/null +++ b/provisioning/get-started.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Get started +Type=Link +URL=https://precice.org/installation-vm.html +Icon=text-html diff --git a/provisioning/install-basics.sh b/provisioning/install-basics.sh index 97cf3e0..76fda55 100644 --- a/provisioning/install-basics.sh +++ b/provisioning/install-basics.sh @@ -1,11 +1,9 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # We (may) need the multiverse repository for the VBox Guest Additions sudo apt-add-repository multiverse -apt-get update +sudo apt-get update sudo apt-get upgrade -qy # Install the Xfce desktop environment and basic applications @@ -15,16 +13,14 @@ sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree ev # Install the VirtualBox guest additions sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 -# Create /home/${USER}/desktop -sudo -u ${USER} mkdir -p /home/${USER}/Desktop -chown ${USER}:${USER} /home/${USER}/Desktop +# Create Desktop +mkdir -p ~/Desktop # Use US-English keyboard layout L='us' && sudo sed -i 's/XKBLAYOUT=\"\w*"/XKBLAYOUT=\"'$L'\"/g' /etc/default/keyboard # Add a shortcut to the keyboard options on the Desktop -cp /usr/share/applications/xfce-keyboard-settings.desktop /home/${USER}/Desktop/ -chmod +x /home/${USER}/Desktop/xfce-keyboard-settings.desktop -chown ${USER}:${USER} /home/${USER}/Desktop/xfce-keyboard-settings.desktop +cp /usr/share/applications/xfce-keyboard-settings.desktop ~/Desktop/ +chmod +x ~/Desktop/xfce-keyboard-settings.desktop # Set a hostname echo "precicevm" | sudo tee /etc/hostname diff --git a/provisioning/install-calculix.sh b/provisioning/install-calculix.sh index 2e4a265..a90073c 100644 --- a/provisioning/install-calculix.sh +++ b/provisioning/install-calculix.sh @@ -1,23 +1,22 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Install dependencies sudo apt-get install -y libarpack2-dev libspooles-dev libyaml-cpp-dev -# Install CalculiX -cd /home/${USER}/ +# Install CalculiX wget --quiet http://www.dhondt.de/ccx_2.16.src.tar.bz2 -tar xvjf ccx_2.16.src.tar.bz2 +tar xvjf ccx_2.16.src.tar.bz2 # Get the CalculiX-preCICE adapter if [ ! -d "calculix-adapter/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/calculix-adapter.git + git clone --depth=1 --branch master https://github.com/precice/calculix-adapter.git fi -cd calculix-adapter -git pull -sudo -u ${USER} -s bash -c "make -j 2" +( + cd calculix-adapter + git pull + make -j 2 +) # Add the CalculiX adapter to PATH -echo "export PATH=\"/home/${USER}/calculix-adapter/bin:\${PATH}\"" >> /home/${USER}/.bashrc \ No newline at end of file +echo "export PATH=\"~/calculix-adapter/bin:\${PATH}\"" >>~/.bashrc diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 68cc9a9..3d63407 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -1,20 +1,18 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Get the config-visualizer from GitHub if [ ! -d "config-visualizer/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/config-visualizer.git + git clone --depth=1 --branch master https://github.com/precice/config-visualizer.git fi -sudo -u ${USER} -s bash -c "pip3 install --user -e config-visualizer" +pip3 install --user -e config-visualizer # Add the config-visualizer to PATH -echo "export PATH=\"/home/${USER}/config-visualizer/bin:${PATH}\"" >> /home/${USER}/.bashrc +echo "export PATH=\"~/config-visualizer/bin:\${PATH}\"" >>~/.bashrc # By default, there is no `python` executable, there is only `python3`, # which causes issues to the config-visualizer -apt-get install -y python-is-python3 +sudo apt-get install -y python-is-python3 # Install graphviz, which provides dot, an almost required package to make this useful -apt-get install -y graphviz +sudo apt-get install -y graphviz diff --git a/provisioning/install-dealii.sh b/provisioning/install-dealii.sh index 65e7a4c..07e4355 100644 --- a/provisioning/install-dealii.sh +++ b/provisioning/install-dealii.sh @@ -1,8 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Install deal.II from the deal.II 9.2.0 backports PPA sudo add-apt-repository ppa:ginggs/deal.ii-9.2.0-backports sudo apt-get update @@ -10,15 +8,13 @@ sudo apt-get install -y libdeal.ii-dev # Get the deal.II-preCICE adapter if [ ! -d "dealii-adapter/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/dealii-adapter.git + git clone --depth=1 --branch master https://github.com/precice/dealii-adapter.git fi -cd dealii-adapter -git pull - -# Build the linear elasticity solver -cd linear_elasticity -sudo -u ${USER} -s bash -c "cmake . && make -j 2" +( + cd dealii-adapter + git pull + cmake . && make -j 2 +) -# Build the nonlinear elasticity solver -cd ../nonlinear_elasticity -sudo -u ${USER} -s bash -c "cmake . && make -j 2" +# Add the deal.II adapter to PATH +echo "export PATH=\"~/dealii-adapter:\${PATH}\"" >>~/.bashrc diff --git a/provisioning/install-devel.sh b/provisioning/install-devel.sh index 36a15a6..b4f8397 100644 --- a/provisioning/install-devel.sh +++ b/provisioning/install-devel.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -sudo apt-get install -y git cmake cmake-curses-gui +sudo apt-get install -y build-essential git cmake cmake-curses-gui -sudo apt-get install -y nano vim gedit \ No newline at end of file +sudo apt-get install -y nano vim gedit diff --git a/provisioning/install-fenics.sh b/provisioning/install-fenics.sh index 4d59a26..8348604 100644 --- a/provisioning/install-fenics.sh +++ b/provisioning/install-fenics.sh @@ -1,15 +1,11 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Install FEniCS from APT -apt-get install -y software-properties-common -add-apt-repository -y ppa:fenics-packages/fenics -apt-get -y update -apt-get -y install --no-install-recommends fenics +sudo apt-get install -y software-properties-common +sudo add-apt-repository -y ppa:fenics-packages/fenics +sudo apt-get -y update +sudo apt-get -y install --no-install-recommends fenics # Install the FEniCS-preCICE adapter from PIP -sudo -u ${USER} pip3 install --user fenicsprecice -# Remove a conflicting with the adapter package -pip3 uninstall -y fenics-ufl \ No newline at end of file +pip3 install --user fenicsprecice diff --git a/provisioning/install-nutils.sh b/provisioning/install-nutils.sh index 591d3d8..7438ef2 100644 --- a/provisioning/install-nutils.sh +++ b/provisioning/install-nutils.sh @@ -1,7 +1,5 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Install Nutils from PIP (we will also need matplotlib in our examples) -sudo -u ${USER} pip3 install --user matplotlib nutils +pip3 install --user matplotlib nutils diff --git a/provisioning/install-openfoam.sh b/provisioning/install-openfoam.sh index 2e8dd46..f34d403 100644 --- a/provisioning/install-openfoam.sh +++ b/provisioning/install-openfoam.sh @@ -1,21 +1,22 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Add the signing key, add the repository, update: wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash # Install OpenFOAM v2012: sudo apt-get install -y openfoam2012-dev -openfoam-selector --set openfoam2012 --system -# todo: Somehow the openfoam-selector is not enough - the binaries are discoverable, but the libraries not. Remedy: -echo "source /etc/profile.d/openfoam-selector.sh" >> /home/vagrant/.bashrc +# Enable OpenFOAM by default and apply now: +echo ". /usr/lib/openfoam/openfoam2012/etc/bashrc" >> ~/.bashrc +# shellcheck source=/dev/null +# . /usr/lib/openfoam/openfoam2012/etc/bashrc # Get the OpenFOAM-preCICE adapter if [ ! -d "openfoam-adapter/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/openfoam-adapter.git + git clone --depth=1 --branch master https://github.com/precice/openfoam-adapter.git fi -cd openfoam-adapter -git pull -sudo -u ${USER} -s bash -l ./Allwmake +( + cd openfoam-adapter + git pull + ./Allwmake +) diff --git a/provisioning/install-paraview.sh b/provisioning/install-paraview.sh index c9e3125..af7ab04 100644 --- a/provisioning/install-paraview.sh +++ b/provisioning/install-paraview.sh @@ -1,14 +1,11 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - if [ ! -d "paraview" ]; then mkdir paraview PARAVIEW_URL="https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.8&type=binary&os=Linux&downloadFile=ParaView-5.8.1-MPI-Linux-Python3.7-64bit.tar.gz" - wget --no-check-certificate --quiet -O - ${PARAVIEW_URL} | tar -xz -C paraview - ln -sf /home/${USER}/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin/paraview /home/${USER}/Desktop/ - chown ${USER}:${USER} /home/${USER}/Desktop/paraview + wget --no-check-certificate --quiet -O - "${PARAVIEW_URL}" | tar -xz -C paraview + ln -sf ~/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin/paraview ~/Desktop/ # Add ParaView to PATH - echo "export PATH=\"/home/${USER}/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin:\${PATH}\"" >> /home/${USER}/.bashrc -fi \ No newline at end of file + echo "export PATH=\"~/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin:\${PATH}\"" >>~/.bashrc +fi diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index f32e3ce..4840bd9 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -1,42 +1,42 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Get preCICE dependencies -apt-get install -y build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy +sudo apt-get install -y cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy # Get preCICE from GitHub: # - Always get the latest master, no need for versioning # - Build in Debug mode, so that users can report bugs if [ ! -d "precice/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/precice.git + git clone --depth=1 --branch master https://github.com/precice/precice.git +fi +( cd precice git pull - sudo -u ${USER} -s bash -c "mkdir build && cd build/ && rm -fv *.deb && cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug .. && make -j 2 && make package" - apt-get install -y ./build/libprecice2_*.deb -fi + mkdir -p build && cd build/ + cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -Wno-dev .. + make -j 2 + rm -fv ./*.deb && make package + sudo apt-get install -y ./libprecice2_*.deb +) -# Collect examples -cd /home/${USER}/Desktop - sudo -u ${USER} cp -r /usr/share/precice/examples/ . - if [ ! -d "tutorials/" ]; then - sudo -u ${USER} git clone --branch master https://github.com/precice/tutorials.git - fi -cd - +# Collect examples and tutorials +cp -r /usr/share/precice/examples/ ./precice-examples +if [ ! -d "tutorials/" ]; then + git clone --depth=1 --branch master https://github.com/precice/tutorials.git + ln -sf ~/tutorials ~/Desktop/ +fi ### OPTIONAL - preCICE Python bindings and Python example # Get PIP and the preCICE Python bindings sudo apt-get install -y python3-pip -sudo -u ${USER} pip3 install --upgrade pip -sudo -u ${USER} pip3 install --user pyprecice +pip3 install --upgrade pip +pip3 install --user pyprecice # Get the Python solverdummy into the examples -cd /home/${USER}/Desktop - if [ ! -d "python-bindings/" ]; then - sudo -u ${USER} git clone --branch master https://github.com/precice/python-bindings.git - fi - sudo -u ${USER} cp -r python-bindings/solverdummy/ examples/solverdummies/python/ - sudo rm -r python-bindings -cd - -### \ No newline at end of file +if [ ! -d "python-bindings/" ]; then + git clone --depth=1 --branch master https://github.com/precice/python-bindings.git +fi +cp -r python-bindings/solverdummy/ precice-examples/solverdummies/python/ +rm -r python-bindings +### diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index e92ed88..358e566 100644 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -1,27 +1,39 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -USER="vagrant" - # Get SU2 6.0.0 from GitHub -cd /home/${USER} -sudo -u ${USER} -s bash -c "wget --quiet https://github.com/su2code/SU2/archive/v6.0.0.tar.gz && tar -xzf v6.0.0.tar.gz" +wget --quiet https://github.com/su2code/SU2/archive/v6.0.0.tar.gz && tar -xzf v6.0.0.tar.gz + +# Add SU2 to PATH and apply. +# We first export to a separate script, so that we can load it here (non-interactive shell). +{ + echo "export SU2_HOME=\"/home/vagrant/SU2-6.0.0\"" + echo "export SU2_RUN=\"\${SU2_HOME}/SU2_CFD/bin\"" + echo "export PATH=\"\${SU2_RUN}:\${PATH}\"" + echo "export PYTHONPATH=\"\${SU2_RUN}:\${PYTHONPATH}\"" +} >> ~/.su2-bashrc -# Add SU2 to PATH -echo "export PATH=\"/home/${USER}/SU2-6.0.0-bin/bin:\${PATH}\"" >> /home/${USER}/.bashrc -echo "export PYTHONPATH=\"/home/${USER}/SU2-6.0.0-bin/bin:\${PYTHONPATH}\"" >> /home/${USER}/.bashrc +echo ". ~/.su2-bashrc" >> ~/.bashrc +# shellcheck source=/dev/null +. ~/.su2-bashrc # Get the SU2-preCICE adapter if [ ! -d "su2-adapter/" ]; then - sudo -u ${USER} git clone --depth=1 --branch master https://github.com/precice/su2-adapter.git + git clone --depth=1 --branch master https://github.com/precice/su2-adapter.git fi -cd su2-adapter -git pull -sudo -u ${USER} -s bash -c "SU2_HOME=\"/home/${USER}/SU2-6.0.0\" ./su2AdapterInstall" +( + cd su2-adapter + git pull + ./su2AdapterInstall +) # Configure and build the SU2 adapter -cd /home/${USER}/SU2-6.0.0 -sudo -u ${USER} -s bash -c "./configure --disable-metis --disable-parmetis --disable-cgns --disable-DOT \ - --disable-MSH --disable-DEF --disable-SOL --disable-GEO \ - --prefix=\"/home/${USER}/SU2-6.0.0-bin\" CXXFLAGS='-std=c++11' && make -j 2" -sudo make install && find . -type f -name '*.o' -exec rm {} \; +( + cd "${SU2_HOME}" + ./configure --disable-metis --disable-parmetis --disable-cgns --disable-DOT \ + --disable-MSH --disable-DEF --disable-SOL --disable-GEO \ + --prefix="${SU2_RUN}" CXXFLAGS='-std=c++11' + make -j 2 + # We still need sudo for whatever reason + sudo make install +) diff --git a/provisioning/install-vscode.sh b/provisioning/install-vscode.sh index 1705156..a1b5f88 100755 --- a/provisioning/install-vscode.sh +++ b/provisioning/install-vscode.sh @@ -5,4 +5,4 @@ sudo snap install code --classic # Install C++ extension code --install-extension ms-vscode.cpptools -code --install-extension austin.code-gnu-global \ No newline at end of file +code --install-extension austin.code-gnu-global diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index 49d93ea..4d5501a 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -1,10 +1,5 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex # Create a link to the default shared folder -ln -sf /vagrant/ /home/vagrant/Desktop/ -mv /home/vagrant/Desktop/vagrant /home/vagrant/Desktop/shared -chown vagrant:vagrant /home/vagrant/Desktop/shared - -# Cleanup the APT cache to save space -apt-get clean \ No newline at end of file +ln -sf /vagrant/ ~/Desktop/shared