Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <[email protected]>
  • Loading branch information
leleliu008 committed Jul 26, 2023
1 parent 16549a6 commit aec76b1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@

A portable package manager for Unix-like system.

<br>
## Caveats

**Note**: This project is being actively developed. It's in beta stage and may not be stable. Some features are subject to change without notice.
- This software is being actively developed. It's in beta stage and may not be stable. Some features are subject to change without notice.

## two implementations
- Please do NOT place your own files under `~/.ppkg` directory, as `ppkg` will change files under `~/.ppkg` directory without notice.

This project provides two implementations:
- Please do NOT run `ppkg` command in parallell to avoid destroying the data.

## Two implementations

This software provides two implementations:

1. implemented in `POSIX Shell`, the source code is on `master` branch.
2. implemented in `C`, the source code is on `dev` branch.

In theroy, these two implementations should have the same behaver except for have bugs.

## Manually build packages using this software via GitHub Actions

In this way, you will be liberated from the rut of setting up the build environemt.

In this way, all you need to do is just clicking the buttons and waiting for finishing. After finishing, a url refers to a zip archive will be provided to download.

For more details please refer to https://github.com/leleliu008/ppkg-package-manually-build

## Install POSIX-Shell-based ppkg via curl

```bash
Expand All @@ -33,12 +45,7 @@ chmod a+x ppkg

## ~/.ppkg

all relevant directories and files are located in `~/.ppkg` directory.

**Caveats**:

- Please do NOT place your own files in `~/.ppkg` directory, as `ppkg` will change files in `~/.ppkg` directory without notice.
- Please do NOT run `ppkg` command in parallell to avoid destroying the data.
all relevant directories and files are located under `~/.ppkg` directory.

## ppkg command usage

Expand Down Expand Up @@ -103,7 +110,7 @@ all relevant directories and files are located in `~/.ppkg` directory.
ppkg integrate zsh -v
```

This project provides a zsh-completion script for `ppkg`. when you've typed `ppkg` then type `TAB` key, the rest of the arguments will be automatically complete for you.
This software provides a zsh-completion script for `ppkg`. when you've typed `ppkg` then type `TAB` key, the rest of the arguments will be automatically complete for you.
**Note**: to apply this feature, you may need to run the command `autoload -U compinit && compinit` in your terminal (your current running shell must be zsh).
Expand Down
20 changes: 9 additions & 11 deletions ppkg
Original file line number Diff line number Diff line change
Expand Up @@ -4409,19 +4409,17 @@ $DOT_CONTENT
do
if perl -M"$item" -le 'print "installed"' > /dev/null 2>&1 ; then
note "perl module $item has been already installed."
else
case $item in
XML::Parser)
# https://metacpan.org/release/TODDR/XML-Parser-2.46/source/Makefile.PL#L8-9
export EXPATLIBPATH="$expat_LIBRARY_DIR"
export EXPATINCPATH="$expat_INCLUDE_DIR"
echo EXPATLIBPATH=$EXPATLIBPATH
echo EXPATINCPATH=$EXPATINCPATH
;;
esac
continue
fi

if [ "$item" = 'XML::Parser' ] ; then
__install_native_package_to_core_dir expat
__install_native_package_to_core_dir perl-XML-Parser
else
# Would you like to configure as much as possible automatically? [yes]
run "printf '%s\n' 'yes' | cpan $item"
# https://perldoc.perl.org/cpan#PERL_MM_USE_DEFAULT
export PERL_MM_USE_DEFAULT=1
run cpan "$item"
fi
done

Expand Down

0 comments on commit aec76b1

Please sign in to comment.