Skip to content

Commit

Permalink
Release v0.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Hernán Morales Durand committed Mar 31, 2022
1 parent 2788e40 commit f60b446
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 81 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [0.5.8](https://github.com/hernanmd/pi/compare/0.5.7...0.5.8)

#### [0.5.7](https://github.com/hernanmd/pi/compare/0.5.6...0.5.7)

> 31 March 2022
- Release v0.5.7 [`2788e40`](https://github.com/hernanmd/pi/commit/2788e409a19f5a47376f5b9e649fedcf904631ae)

#### [0.5.6](https://github.com/hernanmd/pi/compare/0.5.5...0.5.6)

> 15 March 2022
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.7
0.5.8
3 changes: 2 additions & 1 deletion bin/pi
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ source "${BASH_SOURCE%/*}"/../libexec/piParseCmdOptions.sh
## Main Section
#################################

initApp
# Check package cache and repair if necessary
checkCache
parseCmdLine ${@}
11 changes: 1 addition & 10 deletions libexec/piGitHub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trap BLA::stop_loading_animation SIGINT

# Download package list
init_db () {
printf "Please wait while the package list is downloaded... "
printf " Please wait while the package list is downloaded... "
BLA::start_loading_animation "${BLA_clock[@]}"
fetchGitHubPkgNames
parseGitHubPkgCount ${cacheDir}/"1.js"
Expand Down Expand Up @@ -146,15 +146,6 @@ pkgGHInstall () {

# List packages in cache
listGitHubPackages () {
# Check package cache directory exists
if [ -d ${cacheDir} ]; then
if [ -z "$(ls -A ${cacheDir})" ]; then
initApp
fi
else
err "Package cache is broken. Repairing.\n"
initApp
fi
# Parse JSON file
jq -jr ${jqListOptions} \
${cacheDir}/*.js \
Expand Down
38 changes: 38 additions & 0 deletions libexec/piPharo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,44 @@
# pi - Pharo Install - A MIT-pip-like library for Pharo Smalltalk
#

findDistributionID () {
# Find our distribution or OS
# printf "Current OS is: "
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
os="$NAME"
ver="$VERSION_ID"
elif type lsb_release >/dev/null 2>&1; then
# linuxbase.org
os=$(lsb_release -si)
ver=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
# For some versions of Debian/Ubuntu without lsb_release command
. /etc/lsb-release
os="$DISTRIB_ID"
ver="$DISTRIB_RELEASE"
elif [ "$(uname -p)" = "arm64" ]; then
os=$(uname -p)
ver=$(uname -r)
elif [ -f /etc/debian_version ]; then
# Older Debian/Ubuntu/etc.
os="Debian"
ver=$(cat /etc/debian_version)
elif [ -f /etc/SuSe-release ]; then
# Older SuSE/etc.
os="SuSE"
elif [ -f /etc/redhat-release ]; then
# Older Red Hat, CentOS, etc.
os="RedHat"
else
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
os=$(uname -s)
ver=$(uname -r)
fi
# printf "$os\n"
}

#################################
## Pharo Installation Functions
#################################
Expand Down
81 changes: 13 additions & 68 deletions libexec/piUtils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ removeCacheDir () {
fi
}

checkCache () {
# Check package cache directory exists
if [ -d ${cacheDir} ]; then
# Check if cache directory is populated
if [ -z "$(ls -A ${cacheDir})" ]; then
initApp
fi
else
err "Package cache is broken. Repairing.\n"
initApp
fi
}

initApp () {
# Create cache directory if does not exist
[[ -d ${cacheDir} ]] || mkdir ${cacheDir}
Expand All @@ -52,74 +65,6 @@ initApp () {
printf "I require wget or curl, but it's not installed. Aborting.\n"
exit 1
fi
# Initialize package cache
init_db
}

is64Bit () {
[ "$(uname -m)" == "x86_64" ];
return $?
}

downloadWin7z () {
local zip7Win64Exec="7z1801-x64.exe"
local zip7Win64URL="https://www.7-zip.org/a/$zip7Win64Exec"

local zip7Win32Exec="7z1801.exe"
local zip7Win32URL="https://www.7-zip.org/a/$zip7Win32Exec"

printf "Downloading 7-Zip...\n"
if is64Bit; then
if [ ! -f "$zip7Win64Exec" ]; then
$dApp "$zip7Win64URL"
fi
if [ ! -f /c/Program\ Files\ \(x86\)/7-Zip/7z.exe ]; then
# Install 7z
exec ./$zip7Win64Exec
fi
else
if [ ! -f $zip7Win32Exec ]; then
$dApp "$zip7Win32URL"
fi
# Install 7z
exec ./$zip7Win32Exec
fi
}

findDistributionID () {
# Find our distribution or OS
# printf "Current OS is: "
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
os="$NAME"
ver="$VERSION_ID"
elif type lsb_release >/dev/null 2>&1; then
# linuxbase.org
os=$(lsb_release -si)
ver=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
# For some versions of Debian/Ubuntu without lsb_release command
. /etc/lsb-release
os="$DISTRIB_ID"
ver="$DISTRIB_RELEASE"
elif [ "$(uname -p)" = "arm64" ]; then
os=$(uname -p)
ver=$(uname -r)
elif [ -f /etc/debian_version ]; then
# Older Debian/Ubuntu/etc.
os="Debian"
ver=$(cat /etc/debian_version)
elif [ -f /etc/SuSe-release ]; then
# Older SuSE/etc.
os="SuSE"
elif [ -f /etc/redhat-release ]; then
# Older Red Hat, CentOS, etc.
os="RedHat"
else
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
os=$(uname -s)
ver=$(uname -r)
fi
# printf "$os\n"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pi",
"version": "0.5.7",
"version": "0.5.8",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f60b446

Please sign in to comment.