mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
removed make.sh
This commit is contained in:
parent
898326c3a0
commit
9220466561
1 changed files with 0 additions and 25 deletions
25
make.sh
25
make.sh
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
scriptPath=$(dirname -- "${0}")
|
|
||||||
domainPath="${scriptPath}/../../data/domain"
|
|
||||||
userscriptPath="./user.js"
|
|
||||||
resultUserscriptPath="./stable.user.js"
|
|
||||||
|
|
||||||
domain="${DOMAIN}"
|
|
||||||
|
|
||||||
if [ -z "${domain}" ] && [ -f "${domainPath}" ]; then
|
|
||||||
domain=$(cat "${domainPath}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${domain}" ]; then
|
|
||||||
printf "\033[0;41mDOMAIN is not set, and %s does not exist!\033[0m\n" "${domainPath}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "${userscriptPath}" ]; then
|
|
||||||
printf "\033[0;41m%s does not exist!\033[0m\n" "${userscriptPath}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed "s/\[DOMAIN\]/${domain}/g" "${userscriptPath}" > "${resultUserscriptPath}"
|
|
||||||
|
|
||||||
echo "Exported with domain: '${domain}' to '${resultUserscriptPath}'"
|
|
Loading…
Add table
Add a link
Reference in a new issue