added comments

This commit is contained in:
wt committed 2025-01-20 15:58:34 +07:00
1 parent fc2d7e7915
commit f14d5866f3
2 files changed
+11 -1

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
pm.pkg
pm.pkg.gz
rootfs
rootfs
package
+9
View File
@@ -355,6 +355,7 @@ clear() {
}
#------------------------------------------------------------------------
#--- show package dependencies function ---
deps() {
if [ "$1" = "" ]; then
help
@@ -366,7 +367,9 @@ deps() {
fi
cat $installedpackagesdir/$1.pkg/deps
}
#------------------------------------------
#--- build package uses PMBUILD file function ---
buildpkg() {
if [ ! -f ./PMBUILD ]; then
if [ "$1" != "" ]; then
@@ -389,6 +392,7 @@ buildpkg() {
if [ "$gitsource" != "" ]; then
echo $gitsource
git clone $gitsource $srcdir
check $? "Download sources"
fi
if [[ $(type -t build) = function ]]; then
echo "yes"
@@ -398,6 +402,7 @@ buildpkg() {
if [[ $(type -t package) == function ]]; then
echo "yes"
package
check $? "Package"
else
echo "no"
fi
@@ -413,10 +418,13 @@ buildpkg() {
fi
cd $pkgdir
tar -czvf $buildroot/$pkgname-$pkgver-$pkgrel.pkg.gz ..
check $? "Archive package"
cd $buildroot
unset pkgdir srcdir buildroot
}
#-----------------------------------------------------
#--- main ---
case "$1" in
add|a|del|d)
checkroot
@@ -433,3 +441,4 @@ case "$1" in
help
;;
esac
#------------