📦 various changes
This commit is contained in:
parent
0a180fd2ac
commit
0ebb6c8426
42 changed files with 1428 additions and 235 deletions
43
binaries/fedora/cp-fedora-package.sh
Executable file
43
binaries/fedora/cp-fedora-package.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
package="$1"
|
||||
|
||||
base_dir="$(dirname "$(realpath -s "$0")")"
|
||||
package_dir=""
|
||||
|
||||
function get_rpm_property() {
|
||||
package="$1"
|
||||
property="$2"
|
||||
|
||||
echo $(rpm -qi $package | grep "$property" | sed "s|.*: ||")
|
||||
}
|
||||
|
||||
rpm -q $package &>/dev/null
|
||||
[[ $? != 0 ]] && exit $?
|
||||
|
||||
package_name="$(get_rpm_property "$package" "Name")"
|
||||
package_version="$(get_rpm_property "$package" "Version")-$(get_rpm_property "$package" "Release")~$(get_rpm_property "$package" "Architecture")"
|
||||
|
||||
rm -rf "$base_dir/$package_name/$package_version"
|
||||
mkdir -p "$base_dir/$package_name/$package_version"
|
||||
|
||||
rpm -ql $package_name | \
|
||||
while read i
|
||||
do
|
||||
copy="true"
|
||||
system_path="$i"
|
||||
copied_dir="$(dirname $system_path | sed "s|/*||")"
|
||||
copied_filename="$(basename "$system_path")"
|
||||
|
||||
[[ ! -f "$system_path" ]] && copy="false"
|
||||
[[ -d "$system_path" ]] && copy="false"
|
||||
[[ "$system_path" == "/usr/lib/.build-id"* ]] && copy=$false
|
||||
|
||||
if [[ $copy == "true" ]]; then
|
||||
mkdir -p "$base_dir/$package_name/$package_version/$copied_dir"
|
||||
cp -f "$system_path" "$base_dir/$package_name/$package_version/$copied_dir/$copied_filename"
|
||||
echo "[\"../../lfs/binaries/fedora/$package_name/$package_version/$copied_dir/$copied_filename\", \"$system_path\"],"
|
||||
fi
|
||||
done
|
||||
|
||||
#["../../lfs/binaries/fedora/switchboard-plug-useraccounts/2.4.2-1.fc36~x86_64/usr/share/polkit-1/actions/io.elementary.switchboard.useraccounts.policy", "/usr/share/polkit-1/actions/io.elementary.switchboard.useraccounts.policy"]
|
Loading…
Add table
Add a link
Reference in a new issue