cable-service/noise2cable.sh

40 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
2017-01-17 15:52:53 +01:00
### Change the applicationId (i.d., rename the app)
sed -i 's/applicationId "co\.copperhead\.noise"/applicationId "im.cable.cableim"/' build.gradle
### Change other strings:
2017-01-16 19:34:24 +01:00
2017-01-16 17:35:26 +01:00
sed -i 's/Noise/Cable/' res/layout/reminder_header.xml
find res -iname '*.xml' -exec sed -i '
s/Noise /Cable /g;
s/Noise,/Cable,/g;
s/Noise)/Cable)/g;
s/Noise!/Cable!/g;
s/Noise</Cable</g;
s/Noise\./Cable\./g;
s/Noise\\/Cable\\/g;
s/Noise:/Cable:/g;
s/Noise$/Cable/g' {} +
2017-01-16 17:35:26 +01:00
sed -i 's|https://textsecure-service\.whispersystems\.org|https://139\.162\.192\.233:8080|' build.gradle
2017-01-16 19:34:24 +01:00
2017-01-17 15:52:53 +01:00
### The following are needed to install Cable in parallel with Signal or Noise:
sed -i 's/org\.thoughtcrime\.provider\.securesms/im.cable.provider.cableim/' \
2017-01-16 19:34:24 +01:00
AndroidManifest.xml \
src/org/thoughtcrime/securesms/providers/PartProvider.java \
src/org/thoughtcrime/securesms/providers/MmsBodyProvider.java
2017-01-17 15:52:53 +01:00
sed -i 's/org\.thoughtcrime\.securesms\.ACCESS_SECRETS/im.cable.cableim.ACCESS_SECRETS/' \
AndroidManifest.xml \
src/org/thoughtcrime/securesms/service/KeyCachingService.java
# Probably deprecated and not used, could be removed altogether
sed -i 's/org\.thoughtcrime\.securesms\.permission\.C2D_MESSAGE/im.cable.cableim.permission.C2D_MESSAGE/' \
AndroidManifest.xml