feat: add better shell-like command support
You can now execute any kind of program in the PATH. You do, however, need to specify "./" if you want to execute a local file, but that shouldn't be too big a problem.
This commit is contained in:
3
scripts/README.md
Normal file
3
scripts/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# sci default scripts
|
||||
This directory contains some default scripts that may or may not be useful to you.
|
||||
Most of the scripts are fairly simple, but should be installed as part of the sci installation process.
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo ">>> cloning..."
|
||||
git clone $SCI_PIPELINE_URL $SCI_PIPELINE_NAME
|
||||
cd $SCI_PIPELINE_NAME
|
||||
|
||||
echo ">>> running .sci.sh..."
|
||||
time sh .sci.sh
|
8
scripts/git-clone-and-sci.sh
Executable file
8
scripts/git-clone-and-sci.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -ex # print all that we're doing (no need for echo's)
|
||||
tmpdir=$(mktemp -d)
|
||||
git clone --depth=1 --recurse-submodules --shallow-submodules -b $1 "$SCI_PIPELINE_URL" "$tmpdir"
|
||||
shift
|
||||
cd "$tmpdir"
|
||||
sh .sci.sh
|
||||
cd -
|
12
scripts/wget-and-sci.sh
Executable file
12
scripts/wget-and-sci.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# NOTE: This script assumes that the url is a .tar.gz file.
|
||||
# TODO: check if $# is >= 1 and give a warning that the extract dir should be provided.
|
||||
set -ex # print all that we're doing (no need for echo's)
|
||||
tmpdir=$(mktemp -d)
|
||||
wget "$SCI_PIPELINE_URL" -P "$tmpdir"
|
||||
cd "$tmpdir"
|
||||
tar xf *.tar.gz
|
||||
cd $1
|
||||
sh .sci.sh
|
||||
cd -
|
||||
rm -rf "$tmpdir"
|
Reference in New Issue
Block a user