Skip to content

Commit 5056fc2

Browse files
authored
Fix to json scripts (#8301)
* fix toJson command. * move command to sh
1 parent 58c25ea commit 5056fc2

File tree

5 files changed

+9
-88
lines changed

5 files changed

+9
-88
lines changed

scripts/templates/ios/toJson.sh

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
#!/bin/sh
22
cd "$(dirname "$0")"
33

4-
checkLib() {
5-
for lib in "$@"
6-
do
7-
if ! command -v $lib 2>&1 >/dev/null
8-
then
9-
echo "<$lib> not found, installing via brew"
10-
executa brew install $lib
11-
else
12-
echo "$lib ok"
13-
fi
14-
done
15-
}
16-
17-
checkLib jq
18-
19-
plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
20-
cd ./emptyExample.xcodeproj
21-
mv project.pbxproj p.pbxproj
22-
jq --tab . p.pbxproj > project.pbxproj
23-
rm p.pbxproj
24-
4+
plutil -convert json -r ./emptyExample.xcodeproj/project.pbxproj
255
echo "OF XCode template conversion to JSON complete"

scripts/templates/macos/toJson.command

-25
This file was deleted.

scripts/templates/macos/toJson.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
cd "$(dirname "$0")"
3+
4+
plutil -convert json -r ./emptyExample.xcodeproj/project.pbxproj
5+
echo "OF XCode template conversion to JSON complete"
6+

scripts/templates/osx/toJson.sh

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
#!/bin/sh
22
cd "$(dirname "$0")"
33

4-
checkLib() {
5-
for lib in "$@"
6-
do
7-
if ! command -v $lib 2>&1 >/dev/null
8-
then
9-
echo "<$lib> not found, installing via brew"
10-
executa brew install $lib
11-
else
12-
echo "$lib ok"
13-
fi
14-
done
15-
}
16-
17-
checkLib jq
18-
19-
plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
20-
cd ./emptyExample.xcodeproj
21-
mv project.pbxproj p.pbxproj
22-
jq --tab . p.pbxproj > project.pbxproj
23-
rm p.pbxproj
24-
4+
plutil -convert json -r ./emptyExample.xcodeproj/project.pbxproj
255
echo "OF XCode template conversion to JSON complete"

scripts/templates/tvOS/toJson.sh

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
#!/bin/sh
22
cd "$(dirname "$0")"
33

4-
checkLib() {
5-
for lib in "$@"
6-
do
7-
if ! command -v $lib 2>&1 >/dev/null
8-
then
9-
echo "<$lib> not found, installing via brew"
10-
executa brew install $lib
11-
else
12-
echo "$lib ok"
13-
fi
14-
done
15-
}
16-
17-
checkLib jq
18-
19-
plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
20-
cd ./emptyExample.xcodeproj
21-
mv project.pbxproj p.pbxproj
22-
jq --tab . p.pbxproj > project.pbxproj
23-
rm p.pbxproj
24-
4+
plutil -convert json -r ./emptyExample.xcodeproj/project.pbxproj
255
echo "OF XCode template conversion to JSON complete"

0 commit comments

Comments
 (0)