# You should have received a copy of the GNU General Public License along with
# eselect. If not, see <http://www.gnu.org/licenses/>.
# basename wrapper
# basename function
basename() {
echo "${1##*/}"
pstr=${1}
while [[ ${pstr:$(( ${#pstr} - 1 ))} == '/' ]]; do
pstr=${pstr%/}
done
echo "${pstr##*/}"
}
# dirname wrapper