example
This commit is contained in:
parent
feeb2c33cf
commit
b273518dab
14
build.xsh
14
build.xsh
@ -14,10 +14,22 @@ script_dir = pf"{__file__}".absolute().parent
|
||||
build_dir = script_dir / 'build'
|
||||
rm -rf @(build_dir)/
|
||||
mkdir -p @(build_dir)
|
||||
|
||||
cp @(script_dir / 'entrypoint.sh') @(build_dir)/
|
||||
|
||||
cd @(build_dir)
|
||||
if p'your_portable_shell'.exists():
|
||||
eprint('SKIP: Portable shell already builded')
|
||||
else:
|
||||
wget https://your_portable_shell
|
||||
shell_url='...'
|
||||
eprint(f'Download <your_portable_shell> from {shell_url}')
|
||||
if which('wget'):
|
||||
r =![wget -q --show-progress @(shell_url) -O your_portable_shell]
|
||||
if r.returncode != 0:
|
||||
eprint(f'Error while download using wget: {r}')
|
||||
exit(1)
|
||||
elif which('curl'):
|
||||
r =![curl -L @(shell_url) -o your_portable_shell]
|
||||
if r.returncode != 0:
|
||||
eprint(f'Error while download using curl: {r}')
|
||||
exit(1)
|
Loading…
Reference in New Issue
Block a user