test: docker run script adds install script to binary path
1 file changed, +7 -3
+7-3install_test.sh
| @@ -2,7 +2,11 @@ | ||
| 2 | 2 | |
| 3 | 3 | case "$1" in |
| 4 | 4 | "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]" | |
| 8 | 12 | esac |