exa/devtools/dev-set-up-environment.sh
Benjamin Sago 91f1541e85 Make the Vagrant environment creation nicer
Now, instead of reams of unreadable command output, we get a nice set of stages:

[ 0/13] Deleting existing test cases directory
[ 1/13] Creating file size testcases
[ 2/13] Creating file name extension testcases
[ 3/13] Creating file names testcases
[ 4/13] Creating special file kind testcases
[ 5/13] Creating symlink testcases
[ 6/13] Creating user and group testcases
[ 7/13] Creating file permission testcases
[ 8/13] Creating date and time testcases
[ 9/13] Creating extended attribute testcases
[10/13] Creating Git testcases (1/3)
[11/13] Creating Git testcases (2/3)
[12/13] Creating Git testcases (3/3)
[13/13] Creating hidden and dot file testcases

The scripts have been moved out of the Vagrantfile because it was getting long and they're more readable this way.
2020-10-16 23:41:25 +01:00

40 lines
749 B
Bash
Executable File

#!/bin/bash
if [[ ! -d "/vagrant" ]]; then
echo "This script should be run in the Vagrant environment"
exit 1
fi
if [[ $EUID -ne 0 ]]; then
echo "This script should be run as root"
exit 1
fi
source "/vagrant/devtools/dev-fixtures.sh"
# create our test users
if id -u $FIXED_USER &>/dev/null; then
echo "Normal user already exists"
else
echo "Creating normal user"
useradd $FIXED_USER
fi
if id -u $FIXED_LONG_USER &>/dev/null; then
echo "Long user already exists"
else
echo "Creating long user"
useradd $FIXED_LONG_USER
fi
# set up locales
# uncomment these from the config file
sudo sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen
sudo sed -i '/ja_JP.UTF-8/s/^# //g' /etc/locale.gen
sudo locale-gen