-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
891 additions
and
687 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
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
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
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
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
File renamed without changes.
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,48 @@ | ||
#!/usr/bin/env pwsh | ||
# Generated with codemeta-ps1-installer.tmpl, see https://github.com/caltechlibrary/codemeta-pandoc-examples | ||
|
||
# | ||
# Set the package name and version to install | ||
# | ||
$$PACKAGE = "$name$" | ||
$$VERSION = "$version$" | ||
$$GIT_GROUP = "$git_org_or_person$" | ||
$$RELEASE = "https://github.com/$${GIT_GROUP}/$${PACKAGE}/releases/tag/v$${VERSION}" | ||
$$SYSTEM_TYPE = Get-ComputerInfo -Property CsSystemType | ||
if ($$SYSTEM_TYPE.CsSystemType.Contains("ARM64")) { | ||
$$MACHINE = "arm64" | ||
} else { | ||
$$MACHINE = "x86_64" | ||
} | ||
|
||
# FIGURE OUT Install directory | ||
$$BIN_DIR = "$${Home}\bin" | ||
Write-Output "$${PACKAGE} will be installed in $${BIN_DIR}" | ||
|
||
# | ||
# Figure out what the zip file is named | ||
# | ||
$$ZIPFILE = "$${PACKAGE}-v$${VERSION}-Windows-$${MACHINE}.zip" | ||
|
||
# | ||
# Check to see if this zip file has been downloaded. | ||
# | ||
$$DOWNLOAD_URL = "https://github.com/$${GIT_GROUP}/$${PACKAGE}/releases/download/v$${VERSION}/$${ZIPFILE}" | ||
|
||
if (!(Test-Path $$BIN_DIR)) { | ||
New-Item $$BIN_DIR -ItemType Directory | Out-Null | ||
} | ||
curl.exe -Lo "$${ZIPFILE}" "$${DOWNLOAD_URL}" | ||
|
||
tar.exe xf "$${ZIPFILE}" -C "$${Home}" | ||
|
||
Remove-Item $$ZIPFILE | ||
|
||
$$User = [System.EnvironmentVariableTarget]::User | ||
$$Path = [System.Environment]::GetEnvironmentVariable('Path', $$User) | ||
if (!(";$${Path};".ToLower() -like "*;$${BIN_DIR};*".ToLower())) { | ||
[System.Environment]::SetEnvironmentVariable('Path', "$${Path};$${BIN_DIR}", $$User) | ||
$$Env:Path += ";$${BIN_DIR}" | ||
} | ||
|
||
Write-Output "$${PACKAGE} was installed successfully to $${BIN_DIR}" |
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
Oops, something went wrong.