Files
logseq/scripts/set-system-env.sh
llcc 459262cd24 add bb tasks for mobile app development (#5765)
* add bb tasks for mobile development
* update mobile app development readme

Co-authored-by: Andelf <andelf@gmail.com>
2022-06-24 11:22:49 +08:00

21 lines
585 B
Bash

#!/bin/bash
if uname -s | grep -q Darwin; then
SED=gsed
else
SED=sed
fi
PROTOCOL="http"
IP=$(ipconfig getifaddr en0)
PORT="3001"
LOGSEQ_APP_SERVER_URL="${PROTOCOL}://${IP}:${PORT}"
echo -e "Server URL: ${LOGSEQ_APP_SERVER_URL}"
git checkout capacitor.config.ts
$SED -i 's#// , server:# , server:#g' capacitor.config.ts
$SED -i 's#// url:# url:#g' capacitor.config.ts
$SED -i 's#process.env.LOGSEQ_APP_SERVER_URL#"'${LOGSEQ_APP_SERVER_URL}'"#g' capacitor.config.ts
$SED -i 's#// cleartext:# cleartext:#g' capacitor.config.ts
$SED -i 's#// }# }#g' capacitor.config.ts