Думал я долго, но интересно и работает, хоть и не на bash, а на python:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
arg, i = sys.argv, -1
while i != 0:
file = arg[i]
if arg[0] != file:
os.system('pyuic5 -x ' + file + ' -o ' + file[0: -3] + '.py')
i -= 1
else:
break
Выдал права на запуск.
Хорошо справляется с одним файлом:
./build mainQtForm1.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
или несколькими:
./build mainQtForm1.ui mainQtForm2.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
Или со всеми *.ui которые найдет
./build *.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE