Kaydet (Commit) 030193d8 authored tarafından Your Name's avatar Your Name

debian target fix

üst 74494105
...@@ -8,3 +8,6 @@ is_target(){ ...@@ -8,3 +8,6 @@ is_target(){
is_host(){ is_host(){
return [ "$HOST" == "$1" ] return [ "$HOST" == "$1" ]
} }
notnull(){
return [ "$1" == "" ]
}
...@@ -4,16 +4,17 @@ _write_metadata(){ ...@@ -4,16 +4,17 @@ _write_metadata(){
echo -e "Package: $name" echo -e "Package: $name"
#echo -e "Source: $source" #echo -e "Source: $source"
echo -e "Version: $version" echo -e "Version: $version"
echo -e "Section: $partof" notnull $partof && echo -e "Section: $partof"
echo -e "Priority: $priority" notnull $priority && echo -e "Priority: $priority"
echo -e "Architecture: $arch" echo -e "Architecture: $arch"
echo -e "Maintainer: $maintainer <$email>" echo -e "Maintainer: $maintainer <$email>"
echo -e "Installed-Size: $(du -s $INSTALLDIR | cut -f 1)" echo -e "Installed-Size: $(du -s $INSTALLDIR | cut -f 1)"
echo -ne "Depends:" notnull "$depends" && { echo -ne "Depends:"
for dep in ${depends[@]} for dep in ${depends[@]}
do do
echo -ne " $dep," echo -ne " $dep,"
done | sed "s/,$//g" ; echo done | sed "s/,$//g" ; echo
}
echo -e "Homepage: $homepage" echo -e "Homepage: $homepage"
echo -e "Date: $(date +'%d/%m/%Y-%H:%M:%S')" echo -e "Date: $(date +'%d/%m/%Y-%H:%M:%S')"
echo -e "Description: $description\n" echo -e "Description: $description\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment