File tree 2 files changed +40
-0
lines changed
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -28,3 +28,7 @@ export GIT_GLB=${GIT_FRD}/glb
28
28
29
29
export DISPLAY=:0
30
30
31
+ if [ -f " $HOME /.bash-git-prompt/gitprompt.sh" ]; then
32
+ GIT_PROMPT_ONLY_IN_REPO=1
33
+ source $HOME /.bash-git-prompt/gitprompt.sh
34
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if folder is provided
4
+ if [[ $# -ne 1 ]] || [[ ! -d " $1 " ]]; then
5
+ echo " Usage: $0 <folder>"
6
+ exit 1
7
+ fi
8
+
9
+ FOLDER=" $1 "
10
+ declare -A unique_paths
11
+
12
+ # Use 'find' to get all executable files in the folder
13
+ while IFS= read -r -d $' \0' file; do
14
+
15
+ echo " ******** Processing $file "
16
+
17
+ # Run 'ldd' on the current file, extract shared object paths
18
+ # and add them to the associative array.
19
+ while IFS= read -r line; do
20
+
21
+ # Extract paths from ldd output using awk
22
+ path=$( echo " $line " | awk -F' => ' ' {print $2}' | awk ' {print $1}' )
23
+
24
+ if [[ -n " $path " && ! -e " ${unique_paths[$path]} " ]] ; then
25
+ unique_paths[" $path " ]=1
26
+ fi
27
+
28
+ done < <( ldd " $file " )
29
+
30
+ done < <( find " $FOLDER " -type f -executable -print0)
31
+
32
+ # Print unique paths
33
+ for path in " ${! unique_paths[@]} " ; do
34
+ echo " $path "
35
+ done
36
+
You can’t perform that action at this time.
0 commit comments