install.sh: using getopt and fixed some bugs in non-arch system