This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now with less suckage! Oh, and really, add the install recipes, distinguishing in the filenames how they inherited their info, and fixed lack of unarchiving that I thought the download step was going to do for me, forgetting it purge’s destinations on purpose.
- Loading branch information
Showing
5 changed files
with
322 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright 2014 Allister Banks (see end for license) | ||
# | ||
import sys, os | ||
template_string = """<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Description</key> | ||
<string>Installs the current release version of %producto%.</string> | ||
<key>Identifier</key> | ||
<string>com.github.autopkg.install.%producto%</string> | ||
<key>Input</key> | ||
<dict> | ||
<key>Name</key> | ||
<string>%producto%</string> | ||
</dict> | ||
<key>MinimumVersion</key> | ||
<string>0.4.0</string> | ||
<key>ParentRecipe</key> | ||
<string>com.github.autopkg.download.%producto%</string> | ||
<key>Process</key> | ||
<array> | ||
<dict> | ||
<key>Processor</key> | ||
<string>InstallFromDMG</string> | ||
<key>Arguments</key> | ||
<dict> | ||
<key>dmg_path</key> | ||
<string>%pathname%</string> | ||
<key>items_to_copy</key> | ||
<array> | ||
<dict> | ||
<key>source_item</key> | ||
<string>%producto%.app</string> | ||
<key>destination_path</key> | ||
<string>/Applications/</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> | ||
""" | ||
|
||
products = [ | ||
"LibreOffice", | ||
"TeamViewerQS" | ||
] | ||
|
||
filename = "/tmp/scratch" | ||
for product_name in products: | ||
new_string = template_string.replace("%producto%", product_name) | ||
target = open(filename, 'w') | ||
target.write(new_string) | ||
target.close() | ||
os.rename(filename, "/tmp/" + product_name + ".install.recipe") | ||
|
||
print "Ding! Fries are done." | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright 2014 Allister Banks (see end for license) | ||
# | ||
import sys, os | ||
template_string = """<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Description</key> | ||
<string>Installs the current release version of %producto%.</string> | ||
<key>Identifier</key> | ||
<string>com.github.autopkg.install.%producto%</string> | ||
<key>Input</key> | ||
<dict> | ||
</dict> | ||
<key>MinimumVersion</key> | ||
<string>0.4.0</string> | ||
<key>ParentRecipe</key> | ||
<string>com.github.autopkg.download.%producto%</string> | ||
<key>Process</key> | ||
<array> | ||
<dict> | ||
<key>Processor</key> | ||
<string>Installer</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> | ||
""" | ||
|
||
products = [ | ||
"iLokLicenseManager", | ||
"Packages", | ||
"R" | ||
] | ||
|
||
filename = "/tmp/scratch" | ||
for product_name in products: | ||
new_string = template_string.replace("%producto%", product_name) | ||
target = open(filename, 'w') | ||
target.write(new_string) | ||
target.close() | ||
os.rename(filename, "/tmp/" + product_name + ".install.recipe") | ||
|
||
print "Ding! Fries are done." | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.