Add user id param

This commit is contained in:
Daniel Molkentin 2015-03-24 22:05:40 +01:00
parent dafc2d2b73
commit 450a815d61

View file

@ -1,6 +1,11 @@
#!/bin/bash
useradd user
if [ $# -lt 1 ]; then
echo "Usage: $(basename $0) directory_relative_to_home [uid]"
exit
fi
useradd user -u ${2:-1000}
su - user << EOF
cd /home/user/$1
rm -rf build-win32
@ -10,5 +15,5 @@ cd build-win32
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
make -j4
make package
ctest .
EOF