Skip to content
This repository has been archived by the owner on May 2, 2019. It is now read-only.

Commit

Permalink
Fix installation and run scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
misaakidis committed Oct 24, 2015
1 parent 9ae674a commit 3c94d26
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
19 changes: 9 additions & 10 deletions ceno-box/ceno-extra/CENO.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ then
exit 1
fi

function getEnvLang() {
getEnvLang() {
# If $CENOLANG environment variable is not set,
# use the $LANG or $LANGUAGE ones, or if neither
# of the them is set, default to en-us
if [[ -z "$CENOLANG" ]]
if [ -z "$CENOLANG" ]
then
if [[ -n "$LANG" ]]
if [ -n "$LANG" ]
then
CENOLANG=$LANG
elif [[ -n "$LANGUAGE" ]]
elif [ -n "$LANGUAGE" ]
then
CENOLANG=$LANGUAGE
else
Expand All @@ -26,7 +26,7 @@ function getEnvLang() {
echo $CENOLANG
}

function browserExists() {
browserExists() {
if command -v $1 >/dev/null 2>&1
then
return 0;
Expand All @@ -35,14 +35,13 @@ function browserExists() {
fi
}

function startChromeProfile() {
#Experimental: Load the CENO Router extension while invoking chrome
startChromeProfile() {
tempProfile=$(mktemp -d browser-profiles/chrome/google-chrome.XXXXXXX)
$1 --profile-directory=$tempProfile --load-extension=$(pwd)/browser-extensions/ceno-chrome --no-first-run $2 &> /dev/null &
rm -r $tempProfile
}

function startBrowser() {
startBrowser() {
extIntaller=./ceno-client/views/extension-en-us.html
# Open a browser window with the CENO profiles, including the plugin
if browserExists chrome
Expand All @@ -66,11 +65,11 @@ function startBrowser() {
else
echo "None of the supported browsers is installed in your machine."
echo "Please install Chrome or Firefox and execute this script again."
exit 0
exit 2
fi
}

function startCENO() {
startCENO() {
# Start the Freenet node
./run.sh start &> CENO.log

Expand Down
11 changes: 7 additions & 4 deletions ceno-box/installCENO.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ case "$(uname -s)" in

CYGWIN*|MINGW32*|MSYS*)
echo "Windows is not supported yet"
exit 0
exit 1
;;

*)
echo "Could not automatically detect your Operating System"
echo "Manually download the latest release for your system from https://github.com/equalitie/ceno/releases/latest"
exit 0
exit 2
;;
esac

Expand All @@ -28,10 +28,13 @@ LATEST_RELEASE=$(curl -s https://api.github.com/repos/equalitie/ceno/releases/la

# Download and Unzip the latest release of CENOBox for this OS
echo "Downloading CENOBox Release" $LATEST_RELEASE "for" $CENO_OS
wget -q --show-progress https://github.com/equalitie/ceno/releases/download/v0.3.0/CENOBox_$(echo $CENO_OS).zip
unzip CENOBox_$(echo $CENO_OS).zip
echo

curl -0 -J -L "https://github.com/equalitie/ceno/releases/download/$(echo $LATEST_RELEASE)/CENOBox_$(echo $CENO_OS).zip" -o "CENOBox_$(echo $CENO_OS).zip"
unzip -q CENOBox_$(echo $CENO_OS).zip

# Start CENOBox
echo
cd CENOBox
sh ./CENO.sh
cd ..

0 comments on commit 3c94d26

Please sign in to comment.