polygotscripts
A single executable script format that is operable in both UNIX and WINDOWS environment.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Keywords
Repository
A single executable script format that is operable in both UNIX and WINDOWS environment.
Basic Info
Statistics
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 4
Topics
Metadata Files
README.md
Holloway's Polygot Scripts
This is a reference repo serving as a sharing and quality control for my polygot scripts: The same script can be operated in both UNIX and WINDOWS OSes. This script is generally used various multi-system distributions and fleet control initialization where maintaining multi-OSes end products can be easily done.
Why It Matters
Mainly for multi-os decentralized packaging usage:
- 1 common starting point - less communication errors; more control over the package installation.
- Maintainable and documentable - 1 single start point; 1 set of documentation only; 1 easy way to maintain the starting point command.
- Simple and modular - can easily drill down the errors due to modularization and use the most basic commands available in both OSes.
The Products
The products are located in the root repository in various versions:
posix-batch-powershell.sh.ps1.cmd - capable of running in:
- POSIX Shell mode; AND
- BATCH mode; AND
- POWERSHELL mode.
posix-batch.sh.cmd - capable of running in:
- POSIX Shell mode; AND
- BATCH mode; AND
[!NOTE] PowerShell knows how to execute batch script. No auto-correction is required.
- posix-powershell.sh.cmd - capable of running in:
- POSIX Shell mode; AND
- POWERSHELL mode.
[!IMPORTANT] When executed in Batch mode, it will auto-correct itself to PowerShell and execute it from there.
- posix-powershell.sh.ps1 - capable of running in:
- POSIX Shell mode; AND
- POWERSHELL mode.
File Extensions
While UNIX systems do not demand for file extensions, Windows do have its
complex and heavy requirement for it. As a practice, the file extension shall
always be lead by the UNIX (.sh*) and ends with Windows (either *.cmd for
Batch initialization or *.ps1 for PowerShell initialization).
For the highest portability, I recommend keeping the initialization with Batch mode since its execution can auto-correct to PowerShell mode when available (Refer posix-powershell.sh.ps1 for how it's done).
Hence, this is the Polygot script's file extension I would recommend:
filename.sh.ps1.cmd # start by Batch
filename.sh.cmd.ps1 # start by PowerShell
filename.sh.cmd
filename.sh.ps1
Maintain Simplicity for Sanity
It is always advisable to keep this script as simple as calling the OS-specific initializing command rather than develop a fat binary like executable script.
In case you don't know, coding all 3 types of scripts and compile into 1 manually can be a cumbersome task as the output file can easily become 3x larger. Should it be too complex, you should use proper programming languages like Go or Rust.
Please DO NOT abuse it. You have been warned!
License
This project is licensed under MIT License.
Owner
- Name: (Holloway) Chew, Kean Ho
- Login: ChewKeanHo
- Kind: organization
- Email: hello@hollowaykeanho.com
- Location: Malaysia
- Website: https://www.hollowaykeanho.com
- Repositories: 1
- Profile: https://github.com/ChewKeanHo
Personal Group for HollowayKeanHo personal brand and his products & services.
Citation (CITATION.cff)
# WARNING: auto-generated by AutomataCI
cff-version: "1.2.0"
type: "software"
date-released: "2024-02-19"
title: "Polygot Scripts"
version: "1.3.0"
license: "MIT"
repository: "https://github.com/ChewKeanHo/PolygotScripts"
repository-code: "https://github.com/ChewKeanHo/PolygotScripts"
repository-artifact: "https://github.com/ChewKeanHo/PolygotScripts"
url: "https://github.com/ChewKeanHo/PolygotScripts"
contact:
- affiliation: "(Holloway) Chew, Kean Ho"
email: "hello@hollowaykeanho.com"
website: "https://www.hollowaykeanho.com"
abstract: |-
A single executable script format that is operable in both UNIX and WINDOWS
environment.
message: |-
Please cite and reference this repository accordingly.
authors:
- given-names: "Kean Ho"
family-names: "Chew"
email: "hollowaykeanho@gmail.com"
affiliation: "Independent"
orcid: "https://orcid.org/0000-0003-4202-4863"
- given-names: "Cory"
family-names: "Galyna"
email: "124406765+corygalyna@users.noreply.github.com"
affiliation: "Independent"
identifiers:
- type: doi
value: "10.5281/zenodo.000000"
description: "Paper"
keywords:
- "windows"
- "macos"
- "linux"
- "unix"
- "powershell"
- "batch-script"
- "powershell-script"
- "polygot"
- "posix-shell"
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 2
- Total pull requests: 0
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 0
- Average comments per issue: 0.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- hollowaykeanho (1)
- JeanShuralyov (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v4 composite