mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
iop: add compile script to be able to compile a specific package
This commit is contained in:
parent
7e026deb64
commit
adc4b941ee
1 changed files with 22 additions and 0 deletions
22
iop/scripts/compile.sh
Normal file
22
iop/scripts/compile.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
function compile {
|
||||
local cpath pck
|
||||
local lpath=$(find package/ -type l -name $1)
|
||||
local dpath=$(find package/ -type d -name $1)
|
||||
|
||||
for pck in $lpath $dpath; do
|
||||
if [ -n "$(ls $pck/Makefile 2>/dev/null)" ]; then
|
||||
cpath=$pck
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$cpath" ]; then
|
||||
make $cpath/compile V=$2
|
||||
else
|
||||
echo "Package $1 does not exist. Make sure you have installed the necessary feed."
|
||||
fi
|
||||
}
|
||||
|
||||
register_command "compile" "Compile a specific package: ./iop compile <PACKAGE_NAME> [0-99]; i.e ./iop netifd 99"
|
||||
Loading…
Add table
Reference in a new issue