irongit

test: docker run script adds install script to binary path

huncholanehuncholaneauthored
parent 45ac421commit c5f61cc956e37c145d84d1f0a9a4e40458e85aebBrowse files

1 file changed, +7 -3

+7-3install_test.sh
@@ -2,7 +2,11 @@
22
33 case "$1" in
44 "ubuntu") docker run --rm -v "$(pwd):/installer" -w /installer -it ubuntu bash -c "
5- apt update -y && apt install sudo -y && useradd test -m && echo test:test | chpasswd && usermod -aG sudo test &&
6- su - test" ;;
7-"arch") docker run --rm -v "$(pwd):/installer" -w /installer -it arch 'pacman -Syu --noconfirm && pacman -S && pacman -S --noconfirm && useradd test && bash' ;;
5+ apt update -y && apt install sudo -y && useradd test -m && echo test:test | chpasswd && usermod -aG sudo test &&
6+ ln -s /installer/install.sh /bin/doit && su - test" ;;
7+"arch") docker run --rm -v "$(pwd):/installer" -w /installer -it archlinux bash -c "
8+ pacman --noconfirm -Syu && pacman -S sudo --noconfirm && useradd test -m && usermod -aG wheel test &&
9+ echo test:test | chpasswd && sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers &&
10+ ln -s /installer/install.sh /bin/doit && su - test" ;;
11+*) echo "usage: install_test.sh [ubuntu|arch]"
812 esac