mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-01 11:17:55 +03:00
Version 1.08 with public source code release.
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/env bash
|
||||
|
||||
if [ ! "$1" ]; then
|
||||
echo "Usage: $0 <directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for SRC in `find $1 -depth`
|
||||
do
|
||||
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'`
|
||||
if [ "${SRC}" != "${DST}" ]
|
||||
then
|
||||
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
|
||||
fi
|
||||
done
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Author : Hemanth.HM
|
||||
# Email : hemanth[dot]hm[at]gmail[dot]com
|
||||
# License : GNU GPLv3
|
||||
#
|
||||
|
||||
function useage()
|
||||
{
|
||||
cat << EOU
|
||||
Useage: bash $0 <path to the binary> <path to copy the dependencies>
|
||||
EOU
|
||||
exit 1
|
||||
}
|
||||
|
||||
#Validate the inputs
|
||||
[[ $# < 2 ]] && useage
|
||||
|
||||
#Check if the paths are vaild
|
||||
[[ ! -e $1 ]] && echo "Not a vaild input $1" && exit 1
|
||||
[[ -d $2 ]] || echo "No such directory $2 creating..."&& mkdir -p "$2"
|
||||
|
||||
#Get the library dependencies
|
||||
echo "Collecting the shared library dependencies for $1..."
|
||||
deps=$(ldd $1 | awk 'BEGIN{ORS=" "}$1~/^\//{print $1}$3~/^\//{print $3}' | sed 's/,$/\n/')
|
||||
echo "Copying the dependencies to $2"
|
||||
|
||||
#Copy the deps
|
||||
for dep in $deps
|
||||
do
|
||||
echo "Copying $dep to $2"
|
||||
cp "$dep" "$2"
|
||||
done
|
||||
|
||||
echo "Done!"
|
||||
|
||||
Reference in New Issue
Block a user