OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-package/hives.in
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# returns the list of available hives
package_hives_list()
{
local hive=
for hive in "$SDEROOT/lib/sde-package/hives"/*; do
if [ -x "$hive" ]; then
echo "$hive"
fi
done | sed -e 's,^.*/,,'
}
# translates an alias into the hive name
package_hive_alias()
{
local hive=
if [ -x "$SDEROOT/lib/sde-package/hives/$1" ]; then
# the original name was given
echo "$1"
else
for hive in $( package_hives_list ); do
if grep -q "^#Alias: $1$" "$SDEROOT/lib/sde-package/hives/$hive"; then
echo "$hive"
return
fi
done
fi
}
package_hive_desc()
{
sed -n -e 's,^#Description: \(.*\)$,\1,p' "$SDEROOT/lib/sde-package/hives/$1" | head -n 1
}
package_hive_aliases()
{
sed -n -e 's,^#Alias: \([^ ]*\)$,\1,p' "$SDEROOT/lib/sde-package/hives/$1" | tr '\n' ' ' |
sed -e 's/^ *//' -e 's/ *$//'
}