34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
ANDROID_GIT_REVISION=${1:-aad2624bd551c122a8938c12fe2d2240c950b8f4}
|
|
DESKTOP_GIT_REVISION=${1:-ac09a508f1085c58afdeb6c758ccb22ab8ed8e51}
|
|
|
|
update_proto() {
|
|
case "$1" in
|
|
Signal-Android)
|
|
prefix="libsignal-service/src/main/protowire/"
|
|
GIT_REVISION=$ANDROID_GIT_REVISION
|
|
;;
|
|
Signal-Desktop)
|
|
prefix="protos/"
|
|
GIT_REVISION=$DESKTOP_GIT_REVISION
|
|
;;
|
|
esac
|
|
echo https://raw.githubusercontent.com/signalapp/${1}/${GIT_REVISION}/${prefix}${2}
|
|
curl -LOf https://raw.githubusercontent.com/signalapp/${1}/${GIT_REVISION}/${prefix}${2}
|
|
}
|
|
|
|
|
|
update_proto Signal-Android Groups.proto
|
|
update_proto Signal-Android Provisioning.proto
|
|
update_proto Signal-Android SignalService.proto
|
|
update_proto Signal-Android StickerResources.proto
|
|
update_proto Signal-Android WebSocketResources.proto
|
|
update_proto Signal-Android StorageService.proto
|
|
|
|
update_proto Signal-Desktop DeviceName.proto
|
|
update_proto Signal-Desktop UnidentifiedDelivery.proto
|
|
# Android has CDSI.proto too, but the types have more generic names (since android uses a different package name)
|
|
update_proto Signal-Desktop ContactDiscovery.proto
|