Skip to content

Commit

Permalink
Revert useless change in build script
Browse files Browse the repository at this point in the history
  • Loading branch information
YoruNoHikage committed Jan 28, 2016
1 parent 6f16a07 commit 49609f9
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
#!/bin/bash

platform='unknown'
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='mac'
fi

versionNumber=$(sed -ne '/em:version/{s/.*<em:version>\(.*\)<\/em:version>.*/\1/p;q;}' install.rdf)

read -p "Enter your consumer key [Echofon's one]: " consumerKey
read -p "Enter your consumer secret [Echofon's one]: " consumerSecret

rm -rf build
mkdir -p build/src
dirs='chrome/ components/ defaults/ modules/ platform/ chrome.manifest install.rdf'

if [[ $platform == 'mac' ]]; then
rsync -rR $dirs build/src
elif [[ $platform == 'linux' ]]; then
cp -r --parents $dirs build/src
fi

cd build/src
if [[ -n consumerKey && -n consumerSecret ]]; then
if [[ $platform == 'mac' ]]; then
sed -i '' "s/%CONSUMER_KEY%/$consumerKey/g" modules/TwitterClient.jsm
sed -i '' "s/%CONSUMER_SECRET%/$consumerSecret/g" modules/EchofonSign.jsm
elif [[ $platform == 'linux' ]]; then
sed -i "s/%CONSUMER_KEY%/$consumerKey/g" modules/TwitterClient.jsm
sed -i "s/%CONSUMER_SECRET%/$consumerSecret/g" modules/EchofonSign.jsm
fi
fi
cp -r --parents chrome/ components/ defaults/ modules/ platform/ chrome.manifest install.rdf build/src

cd chrome/Echofon
cd build/src/chrome/Echofon
zip -r -9 ../Echofon.jar *
cd ..
rm -rf Echofon
Expand Down

0 comments on commit 49609f9

Please sign in to comment.