Git Product home page Git Product logo

draugmar / scripts-jumpcloud-dmg-to-pkg Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 13 KB

This script converts .dmg files to .pkg format, enabling easy software distribution on macOS through JumpCloud. It automates the provisioning process and provides software tracking using a CSV file.

Shell 100.00%
dmg jumpcloud jumpcloud-manager macos pkg pkgbuild script-automation software-maintenance software-management software-manager

scripts-jumpcloud-dmg-to-pkg's Introduction

scripts-jumpcloud-dmg-to-pkg

Software Provisioning Script for macOS

Objective

This script is designed to facilitate the provisioning of software on macOS machines using JumpCloud. JumpCloud's software distribution feature supports only .pkg files, while software distributions are commonly available in .dmg format. This script automates the conversion of .dmg files to .pkg format, allowing seamless software provisioning through JumpCloud.

Script Explanation

The script performs the following steps:

  1. Mounts the provided .dmg file to a temporary volume.
  2. Converts the mounted .dmg file to .pkg format using the pkgbuild command.
  3. Checks the conversion status. If successful, it offers an option to add the software to a CSV file that tracks the installed software.
  4. If the conversion fails, it attempts to convert the .dmg file using the hdiutil convert command.
  5. If the conversion is successful after using hdiutil convert, it mounts the converted .dmg file and performs the conversion to .pkg format again.
  6. Offers an option to add the software to the CSV file if the conversion is successful.
  7. Detaches the mounted .dmg file or converted .dmg file.
  8. Cleans up temporary files.

Software List

The software_list.csv file contains examples of software entries that can be customized to suit your needs. It provides a structure to follow when adding software to the list. The CSV file includes the following columns:

  • Software Name: The name of the software to be provisioned.
  • Download URL: The URL from where the software can be downloaded in .dmg format.

To add new software entries, follow the format of the existing entries in the CSV file, ensuring that each entry has a unique combination of software name and download URL.


TO_DO

In case the downloaded file is in a format other than .dmg, such as .zip, .tar.gz, or .rar, the script should be extended to handle the extraction of the .dmg file from these archives. Once the .dmg file is extracted, the script can continue with the regular conversion process.


This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


scripts-jumpcloud-dmg-to-pkg's People

Contributors

draugmar avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

renzo-69

scripts-jumpcloud-dmg-to-pkg's Issues

Packages fail Jumpcloud validation

I was giving your script a shot and am running into issues where the generated .pkg files fail validation after uploading to Jumpcloud.

The error message on the Jumpcloud interface reads "The Package Validation Failed. Please delete this instance and try again.".

Unfortunately, Jumpcloud isn't providing any insight as to why the validation failed.

I've tried two packages so far: Charles Proxy 4.6.6 and Google Chrome. I tried Charles Proxy first, and when that failed I tried Google Chrome using the URL that is already included in software-list.csv.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.