Skip to content

Commit

Permalink
v0
Browse files Browse the repository at this point in the history
  • Loading branch information
thinhx committed Sep 16, 2023
1 parent aab86d8 commit d3adc94
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runflow
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# rfsh
# RFSH: Flows running made fast, safe, easy.
> a.k.a @RUNFLOW_SH
```
$curl https://github.com/raw/docsion/rfsh/main/i.sh | sh
```
33 changes: 33 additions & 0 deletions i.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
set -e

echo "Hey @RUNFLOW_SH here!"
RELEASES_URL="https://github.com/docsion/rfsh/releases"
FILE_BASENAME="runflow_sh"
LATEST="$(curl -sf https://github.com/raw/docsion/rfsh/main/latest)"

test -z "$VERSION" && VERSION="$LATEST"

test -z "$VERSION" && {
echo "Unable to get runflow_sh version." >&2
exit 1
}

TMP_DIR="$(mktemp -d)"
# shellcheck disable=SC2064 # intentionally expands here
trap "rm -rf \"$TMP_DIR\"" EXIT INT TERM
OS="$(uname -s)"
ARCH="$(uname -m)"
# test "$ARCH" = "aarch64" && ARCH="arm64"
TAR_FILE="${FILE_BASENAME}_${OS}_${ARCH}.tar.gz"

(
cd "$TMP_DIR"
echo "Downloading runflow_sh $VERSION..."
curl -sfLO "$RELEASES_URL/download/$VERSION/$TAR_FILE"
)

tar -xf "$TMP_DIR/$TAR_FILE" -C "$TMP_DIR"
mv "$TMP_DIR/runflow_sh" ./runflow
echo "Done" $(pwd)/runflow

1 change: 1 addition & 0 deletions latest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.3
31 changes: 31 additions & 0 deletions rf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
set -e

echo "Hey @RUNFLOW_SH here!"
RELEASES_URL="https://github.com/docsion/rfsh/releases"
FILE_BASENAME="runflow_sh"
LATEST="$(curl -sf https://github.com/raw/docsion/rfsh/main/latest)"

test -z "$VERSION" && VERSION="$LATEST"

test -z "$VERSION" && {
echo "Unable to get runflow_sh version." >&2
exit 1
}

TMP_DIR="$(mktemp -d)"
# shellcheck disable=SC2064 # intentionally expands here
trap "rm -rf \"$TMP_DIR\"" EXIT INT TERM
OS="$(uname -s)"
ARCH="$(uname -m)"
# test "$ARCH" = "aarch64" && ARCH="arm64"
TAR_FILE="${FILE_BASENAME}_${OS}_${ARCH}.tar.gz"

(
cd "$TMP_DIR"
echo "Downloading runflow_sh $VERSION..."
curl -sfLO "$RELEASES_URL/download/$VERSION/$TAR_FILE"
)

tar -xf "$TMP_DIR/$TAR_FILE" -C "$TMP_DIR"
"$TMP_DIR/runflow_sh" "$@"
15 changes: 15 additions & 0 deletions sample/sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
id,content
1,the normal
2,"with , comma"
3,"with
end
line "
4,"with , comma
end
line"
5,the utf8 nội dung
59058,the real content id
59058,"real content with , comma
end
line"
8,"[""cơm tấm 30k"",""cơm tấm tân phú""]"
29 changes: 29 additions & 0 deletions sample/sample.out.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
id,content,RFSH_status,RFSH_good,RFSH_bad
1,the normal,good,"hello bash runner 1 the normal
",
3,"with
end
line ",good,"hello bash runner 3 with
end
line
",
4,"with , comma
end
line",good,"hello bash runner 4 with , comma
end
line
",
2,"with , comma",good,"hello bash runner 2 with , comma
",
5,the utf8 nội dung,good,"hello bash runner 5 the utf8 nội dung
",
59058,the real content id,good,"hello bash runner 59058 the real content id
",
59058,"real content with , comma
end
line",good,"hello bash runner 59058 real content with , comma
end
line
",
8,"[""cơm tấm 30k"",""cơm tấm tân phú""]",good,"hello bash runner 8 [cơm tấm 30k,cơm tấm tân phú]
",
1 change: 1 addition & 0 deletions sample/sample.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo "hello bash runner {{id}} {{content}}"

0 comments on commit d3adc94

Please sign in to comment.