Browse Source

sde-package: Added package_exists() to lib/sde-package.in

karasz/new-early
Alejandro Mery 17 years ago
parent
commit
bd022b9087
1 changed files with 13 additions and 3 deletions
  1. +13
    -3
      lib/sde-package.in

+ 13
- 3
lib/sde-package.in

@ -12,14 +12,24 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
package_autodetect() {
package_autodetect()
{
pwd -P | sed -n -e "s,^$SDEROOT/package/[^/]*/\([^/]*\)\(/.*\)\?$,\1,p"
}
package_autodetect_repo() {
package_autodetect_repo()
{
pwd -P | sed -n -e "s,^$SDEROOT/package/\([^/]*\)\(/.*\)\?,\1,p"
}
package_confdir() {
package_exists()
{
local x=$( ls -1 "$SDEROOT/package"/*/"$1/$1.desc" 2> /dev/null )
[ -s "$x" ]
}
package_confdir()
{
ls -1d "$SDEROOT/package"/*/"$1" 2> /dev/null | head -n 1
}

Loading…
Cancel
Save