Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
b1562e7d33
|
|||
e293c02fbb
|
|||
e0ddbff0d1
|
15
README.md
15
README.md
@ -1,16 +1,17 @@
|
||||
# Octozipo
|
||||
<h2><img align="middle" src="https://raw.githubusercontent.com/odb/official-bash-logo/master/assets/Logos/Icons/PNG/64x64.png" >
|
||||
Octozipo - Convert Zip package to a repository.
|
||||
</h2>
|
||||
|
||||
Written by Llewellyn van der Merwe (@llewellynvdm)
|
||||
|
||||
Convert Zip packages to repositories and if they exist update and tag them.
|
||||
|
||||
Linted by [#ShellCheck](https://github.com/koalaman/shellcheck)
|
||||
|
||||
## Install
|
||||
|
||||
## Get needed access token
|
||||
|
||||
Get a token from [https://git.vdm.dev/user/settings/applications](https://git.vdm.dev/user/settings/applications)
|
||||
|
||||
```shell
|
||||
$ export SETUP_TOKEN="xxxxxxxxxxtokenxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
$ sudo curl -L "https://git.vdm.dev/api/v1/repos/octoleo/octozipo/raw/src/octozipo?access_token=${SETUP_TOKEN}" -o /usr/local/bin/octozipo
|
||||
$ sudo curl -L "https://git.vdm.dev/api/v1/repos/octoleo/octozipo/raw/src/octozipo" -o /usr/local/bin/octozipo
|
||||
$ sudo chmod +x /usr/local/bin/octozipo
|
||||
```
|
||||
- Global **environment** file can be set at: `/home/$USER/.config/octozipo/.env`
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Program name
|
||||
PROGRAM_NAME="Octozipo"
|
||||
PROGRAM_CODE="octozipo"
|
||||
PROGRAM_VERSION="2.2.6"
|
||||
PROGRAM_VERSION="2.2.7"
|
||||
PROGRAM_V="2.2"
|
||||
# PROGRAM_URL="https://git.vdm.dev/octoleo/${PROGRAM_CODE}"
|
||||
|
||||
@ -84,7 +84,7 @@ main() {
|
||||
# get the package details
|
||||
getPackageDetails "${zip_name}" "${folder_name}"
|
||||
# check if the repo exist on our system
|
||||
if git ls-remote --exit-code --heads "git@${VDM_GIT_URL}:${VDM_ORG}/${VDM_REPO_NAME}.git" "${VDM_REPO_BRANCH}" -q >/dev/null 2>&1; then
|
||||
if git ls-remote --exit-code --heads "git@${VDM_GIT_URL}:${VDM_ORG}/${VDM_REPO_NAME}.git" "${VDM_REPO_BRANCH}" >/dev/null 2>&1; then
|
||||
# check if repo is locally found
|
||||
cd "${VDM_PATH_REPO}" >/dev/null 2>&1 || {
|
||||
git clone "git@${VDM_GIT_URL}:${VDM_ORG}/${VDM_REPO_NAME}.git" \
|
||||
@ -806,7 +806,7 @@ function getVersionNumberByFile() {
|
||||
|
||||
function rightStrip() {
|
||||
# Usage: rightStrip "string" "pattern"
|
||||
printf '%s\n' "${1%%$2}"
|
||||
printf '%s\n' "${1%%"$2"}"
|
||||
}
|
||||
|
||||
# leftStrip - Removes the specified pattern from the start of a string
|
||||
@ -824,7 +824,7 @@ function rightStrip() {
|
||||
# The modified string with the pattern removed from the start
|
||||
function leftStrip() {
|
||||
# Usage: leftStrip "string" "pattern"
|
||||
printf '%s\n' "${1##$2}"
|
||||
printf '%s\n' "${1##"$2"}"
|
||||
}
|
||||
|
||||
# This function unzips the package located in the `VDM_ZIP_DIR` directory to the specified folder.
|
||||
|
Reference in New Issue
Block a user