build: changed build scripts
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
21ef3f7ef6
commit
672314ab6d
3 changed files with 43 additions and 11 deletions
39
build
Executable file
39
build
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
build_pkgr() {
|
||||
cd pkgr
|
||||
mkdir -p dist/root/{usr/bin,etc/pkgr}
|
||||
echo -e "You can't use pkgr to update pkgr because the file will be in use while updating.\nuse bootpkg" > dist/root/etc/pkgr/YOU-CAN-NOT-USE-PKGR-TO-UPDATE-PKGR.txt
|
||||
|
||||
# for bin
|
||||
cargo build -r
|
||||
cp target/release/pkgr dist/root/usr/bin/pkgr
|
||||
|
||||
# for build
|
||||
mkdir -p dist/pkgr
|
||||
cp -r src/ Cargo.toml dist/pkgr
|
||||
cp -r ../manifest dist/manifest
|
||||
cp -r ../pkgfile dist/pkgfile
|
||||
|
||||
cd dist
|
||||
python ../../pkg.py ../package.toml pkgr.pkg "*"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
build_bootpkg() {
|
||||
cd bootpkg
|
||||
mkdir -p dist/root/usr/bin
|
||||
|
||||
cargo build -r
|
||||
cp target/release/bootpkg dist/root/usr/bin/bootpkg
|
||||
|
||||
|
||||
cd dist
|
||||
python ../../pkg.py ../package.toml bootpkg.pkg "*"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
build_bootpkg
|
||||
build_pkgr
|
Loading…
Add table
Add a link
Reference in a new issue