/
hubbitus
/
shell.scripts
Обзор
Документация
Войти
/
hubbitus
/
shell.scripts
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
zip-win-rus.groovy
16 строк
379 B
Pavel Alexeev
Correct commandline arguments pass check
23 сен 2020, 15:30
23 сен 2020, 15:30
4b28b5a
Код
Авторство
О чём код?
#!/usr/bin/env groovy // Solved problem: http://www.opennet.ru/tips/info/2494.shtml (recipes from there does not work, patches does not tested) if (!args.length){ println 'You must provide single argument - archive name' System.exit(1) } def ant = new AntBuilder() // create an antbuilder ant.zip( basedir: args[0], destfile: "${args[0]}.zip", encoding: 'Cp866' )