Skip to content

Commit e1a9ab1

Browse files
committed
0.4 "depends"
Add test depend for elf-file
1 parent 080c631 commit e1a9ab1

File tree

16 files changed

+159
-342
lines changed

16 files changed

+159
-342
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3
1+
0.4

control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: bash-deb-build
2-
Version: 0.3
2+
Version: 0.4
33
Architecture: all
44
Maintainer: zvezdochiot <[email protected]>
55
Section: utils

deb-build.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
#deb-build.sh
33

4-
VER="0.3"
4+
VER="0.4"
55
GREEN="\033[1;32m"
66
RED="\033[0;31m"
77
YELLOW="\033[1;33m"

deb-depends-test.sh

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/bin/bash
2+
# deb-depends-test.sh
3+
4+
VER="4.0"
5+
GREEN="\033[1;32m"
6+
RED="\033[0;31m"
7+
YELLOW="\033[1;33m"
8+
ENDCOLOR="\033[0m"
9+
10+
tproc=`basename $0`
11+
echo -e $GREEN"$tproc version $VER"$ENDCOLOR
12+
echo ""
13+
14+
usage()
15+
{
16+
tproc=`basename $0`
17+
echo -e $YELLOW"usage:"$ENDCOLOR
18+
echo -e $GREEN" bash $tproc elf-component"$ENDCOLOR
19+
}
20+
21+
testargs()
22+
{
23+
if [ "+$1" = "+" -o "+$1" = "+-h" -o "+$1" = "+--help" ]
24+
then
25+
usage
26+
exit 0
27+
fi
28+
}
29+
30+
testcomponent()
31+
{
32+
tnocomp=""
33+
tcomp="/usr/bin/objdump"
34+
tdeb="binutils_*.deb"
35+
if [ ! -f "$tcomp" ]
36+
then
37+
tnocomp="$tnocomp $tcomp($tdeb)"
38+
fi
39+
tcomp="/usr/bin/dpkg"
40+
tdeb="dpkg_*.deb"
41+
if [ ! -f "$tcomp" ]
42+
then
43+
tnocomp="$tnocomp $tcomp($tdeb)"
44+
fi
45+
if [ "+$tnocomp" != "+" ]
46+
then
47+
echo -e $RED"Not found $tnocomp !"$ENDCOLOR
48+
echo ""
49+
exit 0
50+
fi
51+
}
52+
53+
main()
54+
{
55+
tlog="$1.depends"
56+
echo "" > "$tlog"
57+
echo "$1" >> "$tlog"
58+
echo "" >> "$tlog"
59+
60+
objdump -x $1 | grep -w NEEDED | awk '{print $2}' | while read tlib
61+
do
62+
echo "Library: $tlib" >> "$tlog"
63+
dpkg -S $tlib >> "$tlog"
64+
echo "" >> "$tlog"
65+
done
66+
}
67+
68+
testargs $1
69+
testcomponent
70+
main $1
71+
72+
#end

deb-unpack.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
#deb-unpack.sh
33

4-
VER="0.3"
4+
VER="0.4"
55
GREEN="\033[1;32m"
66
RED="\033[0;31m"
77
YELLOW="\033[1;33m"
-21.5 KB
Binary file not shown.
2.39 KB
Binary file not shown.

example/bash-deb-build/config/control

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Package: bash-deb-build
2-
Version: 0.3
2+
Version: 0.4
33
Architecture: all
44
Maintainer: zvezdochiot <[email protected]>
55
Section: utils
66
Priority: optional
7-
Installed-Size: 36
87
Depends: dpkg, grep, tar, gzip, coreutils, binutils
9-
Homepage: http://mykaralw.narod.ru/
8+
Installed-Size: 20
9+
Homepage: https://github.com/BASH-Auto-Tools/bash-deb-build
1010
Description: Bash-script for build deb package.
1111
Bash-script for build deb package:
1212
build:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
67acb21ed5eaf746338e545776ea3e62 usr/share/scripts/bash/deb-unpack.sh
2-
5a2d6eec06ddea876015418902d5e079 usr/share/scripts/bash/deb-build.sh
3-
9386fb1465342ba9b7660b72ea6dafda usr/share/resources/bash-deb-build/example.tar.gz
1+
eacd0ca6845cd863b80256428cd4ff09 usr/share/scripts/bash/deb/deb-unpack.sh
2+
67142b35c77261ef73629b7d33bef637 usr/share/scripts/bash/deb/deb-depends-test.sh
3+
cf862fc46f6a9d980d953757fa218655 usr/share/scripts/bash/deb/deb-build.sh

example/bash-deb-build/data/usr/bin/bash-deb-build

Lines changed: 0 additions & 211 deletions
This file was deleted.

0 commit comments

Comments
 (0)