diff --git a/scripts/runDocker.sh b/scripts/runDocker.sh deleted file mode 100755 index 73cd7fa..0000000 --- a/scripts/runDocker.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -repoName='qminer/mrfrys-node-server' - -function getContainerId() { - docker ps -a | grep -i "${repoName}" | xargs | cut -d' ' -f1 -} - -function getDockerRepoId() { - docker images | grep "${repoName}" | xargs | cut -d' ' -f3 -} - -if [ "$1" == "build" ]; then - docker build . -t qminer/mrfrys-node-server -elif [ "$1" == "rebuild" ]; then - docker rmi -f $(getDockerRepoId) - docker build . -t qminer/mrfrys-node-server -elif [ "$1" == "build" ]; then - docker build . -t qminer/mrfrys-node-server -elif [ "$1" == "stop" ]; then - docker stop $(getContainerId) -elif [ "$1" == "start" ]; then - # --entrypoint bash \ - scripts/setup.sh - docker start $(getContainerId) -elif [ "$1" == "run" ]; then - # --entrypoint bash \ - scripts/setup.sh - - docker run \ - --network host \ - --mount src="$(pwd)/stats",target="/server/stats",type=bind \ - --mount src="$(pwd)/data",target="/server/data",type=bind \ - --mount src="$(pwd)/publicDirs",target="/server/publicDirs",type=bind \ - --mount src="/etc/letsencrypt",target="/etc/letsencrypt",type=bind \ - qminer/mrfrys-node-server -elif [ "$1" == "bash" ]; then - docker exec -it $(getContainerId) /bin/bash -else - echo 'params: "build" or "run"' -fi diff --git a/scripts/setup.sh b/scripts/setup.sh index fa92694..9895ed6 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,13 +1,13 @@ -#!/bin/bash +#!/bin/sh baseDir=$(pwd) domainPath="./data/domain" hr() { [ -t 0 ] && printf '\033[0;32m%*s\033[0m\n' "$(tput cols)" '' | tr ' ' '='; } -log() { hr; echo -e "\033[0;34m${1}\033[0m"; hr; } +log() { hr; printf "\033[0;34m%s\033[0m" "${1}"; hr; } -error() { echo -e "\033[0;41m${1}\033[0m"; } +error() { printf "\033[0;41m%s\033[0m" "${1}"; } checkFile() { if [ ! -f "${1}" ]; then @@ -22,7 +22,7 @@ makeNextSubmodule() { npm install npm audit fix > /dev/null 2> /dev/null checkFile "make.sh" - ./make.sh || exit 1 + npm run export || exit 1 npx --yes next telemetry disable cd "${baseDir}" || exit 1 # TODO: check if link exists diff --git a/scripts/switchGitProtocol.sh b/scripts/switchGitProtocol.sh index c8646e9..4245bf5 100755 --- a/scripts/switchGitProtocol.sh +++ b/scripts/switchGitProtocol.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/bin/sh gitDir=".git" gitmoduleFile=".gitmodules" sshGitmodulesFile=".gitmodules.ssh" httpsGitmodulesFile=".gitmodules.https" -function error() { echo -e "\033[0;41m${1}\033[0m"; exit 1; } +error() { printf "\033[0;41m%s\033[0m" "${1}"; exit 1; } if [ ! -d "${gitDir}" ]; then error "${gitDir} does not exist! Maybe you ran this script in the wrong directory" @@ -15,8 +15,8 @@ if [ "$1" != "ssh" ] && [ "$1" != "https" ]; then error "Invalid param! Valid params are: 'ssh', 'https'" fi -if [ "$1" == "ssh" ]; then +if [ "$1" = "ssh" ]; then cp -v "$sshGitmodulesFile" "$gitmoduleFile" -elif [ "$1" == "https" ]; then +elif [ "$1" = "https" ]; then cp -v "$httpsGitmodulesFile" "$gitmoduleFile" fi diff --git a/submodules/qmining-data-editor b/submodules/qmining-data-editor index b854b03..fa8d245 160000 --- a/submodules/qmining-data-editor +++ b/submodules/qmining-data-editor @@ -1 +1 @@ -Subproject commit b854b035c7b9d3054f4e61ee32b8802b395477a2 +Subproject commit fa8d2459a3f7d2c27a28dbc287525921876a3af1 diff --git a/submodules/qmining-page b/submodules/qmining-page index 50daae3..a2c3d7c 160000 --- a/submodules/qmining-page +++ b/submodules/qmining-page @@ -1 +1 @@ -Subproject commit 50daae3cf1713b96626fa5a55638570a910f5294 +Subproject commit a2c3d7c72f0d1df812cfff15ec3738cb4374a247