mirror of
https://github.com/termux-pacman/glibc-packages.git
synced 2025-02-23 22:05:03 +00:00
17 lines
297 B
Bash
17 lines
297 B
Bash
#!/usr/bin/env bash
|
|
|
|
# from package filename to package name (with proper file structure)
|
|
|
|
get_name() {
|
|
local name=""
|
|
local file_sp=(${1//-/ })
|
|
for k in $(seq 0 $((${#file_sp[*]}-4))); do
|
|
if [ -z $name ]; then
|
|
name="${file_sp[k]}"
|
|
else
|
|
name+="-${file_sp[k]}"
|
|
fi
|
|
done
|
|
echo $name
|
|
}
|