Skip to content

Commit

Permalink
toJson scripts added
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitre committed Feb 13, 2025
1 parent 24d166e commit 46a05a7
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/apothecary
Submodule apothecary updated 176 files
25 changes: 25 additions & 0 deletions scripts/templates/ios/toJson.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
cd "$(dirname "$0")"

checkLib() {
for lib in "$@"
do
if ! command -v $lib 2>&1 >/dev/null
then
echo "<$lib> not found, installing via brew"
executa brew install $lib
else
echo "$lib ok"
fi
done
}

checkLib jq

plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
cd ./emptyExample.xcodeproj
mv project.pbxproj p.pbxproj
jq --tab . p.pbxproj > project.pbxproj
rm p.pbxproj

echo "OF XCode template conversion to JSON complete"
25 changes: 25 additions & 0 deletions scripts/templates/macos/toJson.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
cd "$(dirname "$0")"

checkLib() {
for lib in "$@"
do
if ! command -v $lib 2>&1 >/dev/null
then
echo "<$lib> not found, installing via brew"
executa brew install $lib
else
echo "$lib ok"
fi
done
}

checkLib jq

plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
cd ./emptyExample.xcodeproj
mv project.pbxproj p.pbxproj
jq --tab . p.pbxproj > project.pbxproj
rm p.pbxproj

echo "OF XCode template conversion to JSON complete"
25 changes: 25 additions & 0 deletions scripts/templates/osx/toJson.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
cd "$(dirname "$0")"

checkLib() {
for lib in "$@"
do
if ! command -v $lib 2>&1 >/dev/null
then
echo "<$lib> not found, installing via brew"
executa brew install $lib
else
echo "$lib ok"
fi
done
}

checkLib jq

plutil -convert json ./emptyExample.xcodeproj/project.pbxproj
cd ./emptyExample.xcodeproj
mv project.pbxproj p.pbxproj
jq --tab . p.pbxproj > project.pbxproj
rm p.pbxproj

echo "OF XCode template conversion to JSON complete"

0 comments on commit 46a05a7

Please sign in to comment.