Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Latest commit

 

History

History
History
executable file
·
29 lines (20 loc) · 761 Bytes

File metadata and controls

executable file
·
29 lines (20 loc) · 761 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -euo pipefail
# find newest jar file
jar_file=$(ls -t target/tmc-cli-*.jar | head -1)
# escape the string argument $1 for using it as substitution string in sed
quotePerlSubst() {
IFS= read -d '' -r < <(sed -e ':a' -e '$!{N;ba' -e '}' -e 's/[$/\]/\\&/g; s/\n/\\&/g' <<<"$1")
printf %s "${REPLY%$'\n'}"
}
content=$(cat scripts/stub.sh)
ac_content=$(quotePerlSubst "$(cat scripts/autocompletion.sh)")
content=$(echo "$content" | sed "s/\#EMBED_AUTOCOMPLETE_SH/$ac_content/g")
if [ "${1-}" = "--with-unit-tests" ] ; then
ac_content=$(quotePerlSubst "$(cat scripts/unit_tests.sh)")
content=$(echo "$content" | \
sed "s/\#EMBED_UNIT_TESTS_SH/$ac_content/g")
fi
echo "$content" > tmc
cat "$jar_file" >> tmc && chmod +x tmc
chmod +x tmc
Morty Proxy This is a proxified and sanitized view of the page, visit original site.