feat: Ask user for package name if $PACKAGE is undefined

This commit is contained in:
sharpenedblade
2023-07-27 19:46:34 +05:30
parent ef87f27e65
commit 2cf2e71d38
2 changed files with 8 additions and 8 deletions
+1 -7
View File
@@ -40,16 +40,10 @@ git clone --depth 1 https://github.com/t2linux/t2linux-fedora-kernel
cd t2linux-fedora-kernel
```
Pick the package you want to build (`t2linux-config`, `t2linux-repo`, `t2linux-config`, or `kernel`):
```
export PACKAGE="packagenamehere"
```
Then run the build container, which has dependencies already installed. The packages will be in the `_output` directory:
```
podman run -it -v "$PWD":/repo -e PACKAGE ghcr.io/t2linux/fedora-dev:latest /repo/build-packages.sh
podman run -it -v "$PWD":/repo ghcr.io/t2linux/fedora-dev:latest /repo/build-packages.sh
```
## Credits
+7 -1
View File
@@ -1,6 +1,12 @@
#!/usr/bin/bash
source /repo/util.sh
if [[ -z "$PACKAGE" ]]; then
PACKAGE=""
echo "Available packages: t2linux-config, t2linux-repo, t2linux-config, or kernel"
read -p "Name of package to build: " PACKAGE
fi
cd /repo
if [ "$PACKAGE" == "kernel" ]; then
@@ -8,4 +14,4 @@ if [ "$PACKAGE" == "kernel" ]; then
fi
cd /repo/$PACKAGE
build_package $PACKAGE.spec
build_package $PACKAGE.spec