Skip to content

Commit

Permalink
Merge pull request #5 from PacBrew/dev
Browse files Browse the repository at this point in the history
merge dev branch
  • Loading branch information
Cpasjuste authored May 7, 2024
2 parents fddcdf9 + 610ee15 commit 3b52fa0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pacbrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
known_hosts: '# dummy'
- name: Setting ssh for pacbrew user
run: |
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> /root/.ssh/known_hosts
ssh-keyscan -t rsa ${{ secrets.SSH_HOST }} >> /root/.ssh/known_hosts
cp -r /root/.ssh/. /home/pacbrew/.ssh/
chown -R pacbrew:pacbrew /home/pacbrew/.ssh
# Update pacbrew repo
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PacBrew is a pacman based package manager for building and/or managing toolchain
<summary>ubuntu 24.04</summary>

```
sudo apt install pacman-package-manager makepkg build-essential autoconf libtool cmake git curl
sudo apt install pacman-package-manager makepkg libarchive-tools build-essential autoconf libtool cmake git curl
```
</details>
<details>
Expand Down
14 changes: 12 additions & 2 deletions pacbrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,20 @@ function install_remote_package {
#&> /dev/null
}

# clean_package PKGPATH
function clean_package {
pushd "$1" &> /dev/null || exit 1
#rm -rf *.pkg.tar.* || exit 1
#git clean -fd -x .
popd &> /dev/null || exit 1
}

# build_package PKGPATH ARCH
function build_package {
# build package
pushd "$1" &> /dev/null || exit 1
rm -rf *.pkg.tar.xz &> /dev/null || exit 1
CARCH=$2 makepkg -C -f || exit 1
rm -rf *.pkg.tar.* &> /dev/null || exit 1
CARCH=$2 makepkg -C -f --clean || exit 1
popd &> /dev/null || exit 1
}

Expand Down Expand Up @@ -167,6 +175,8 @@ function build_packages {
scp $line/*.pkg.tar.xz $PACBREW_SSH_USER@$PACBREW_SSH_HOST:/var/www/pacbrew/packages/ || exit 1
repo-add pacbrew-repo/pacbrew.db.tar.gz $line/*.pkg.tar.xz || exit 1
fi
# cleanup
clean_package "$line"
else
# always install deps for later packges build
echo -e "${COL_GREEN}build_packages: $local_pkgname${COL_NONE} is up to date, installing if needed..."
Expand Down

0 comments on commit 3b52fa0

Please sign in to comment.