-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathreplaceSecret.sh
More file actions
30 lines (28 loc) · 858 Bytes
/
replaceSecret.sh
File metadata and controls
30 lines (28 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TARGETPCH=Example/Whiteboard/Whiteboard-Prefix.pch
TESTPCH=Example/Tests/Tests-Prefix.pch
# project comment
comment='\/\/'#'define'
to=''#'define'
sed -i "" "s/$comment/$to/g" $TARGETPCH
# roomuuid
uuid='<'#'Room UUID'#'>'
sed -i "" "s/$uuid/$1/g" $TARGETPCH
sed -i "" "s/$uuid/$1/g" $TESTPCH
# roomToken
roomToken='<\'#'Room Token\'#'>'
sed -i "" "s/$roomToken/$2/g" $TARGETPCH
sed -i "" "s/$roomToken/$2/g" $TESTPCH
# appidentifier
appidentifier='<'#'@App identifier'#'>'
sed -i "" "s/$appidentifier/$3/g" $TARGETPCH
sed -i "" "s/$appidentifier/$3/g" $TESTPCH
# sdktoken
sdkToken='<'#'@sdk Token'#'>'
sed -i "" "s/$sdkToken/$4/g" $TARGETPCH
sed -i "" "s/$sdkToken/$4/g" $TESTPCH
# replayuuid
replayuuid='<'#'Replay UUID'#'>'
sed -i "" "s/$replayuuid/$5/g" $TESTPCH
# replayToken
replayToken='<'#'Replay Token'#'>'
sed -i "" "s/$replayToken/$6/g" $TESTPCH