Lines 20-27
Link Here
|
20 |
Valid options are: |
20 |
Valid options are: |
21 |
-h, --help display help screen |
21 |
-h, --help display help screen |
22 |
-v, --version display version information |
22 |
-v, --version display version information |
23 |
-a, --aptconf name of alternative apt.conf |
23 |
-a, --aptconf <filename> name of alternative apt.conf |
24 |
-u, --update update apt-box |
24 |
-u, --update update apt-box |
|
|
25 |
-t, --target <architecture> hasher building architecture (i586 by default) |
25 |
-p, --profile <profile> use profile instead of default |
26 |
-p, --profile <profile> use profile instead of default |
26 |
|
27 |
|
27 |
Report bugs to <rider@altlinux.org> |
28 |
Report bugs to <rider@altlinux.org> |
Lines 32-44
Link Here
|
32 |
|
33 |
|
33 |
|
34 |
|
34 |
#parse command line options |
35 |
#parse command line options |
35 |
TEMP=`getopt -n $PROG -o a:,v,h,u,p: -l aptconf:,version,help,update,profile: -- "$@"` || exit 1 |
36 |
TEMP=`getopt -n $PROG -o a:,v,h,u,p:,t: -l aptconf:,version,help,update,profile:,target: -- "$@"` || exit 1 |
36 |
eval set -- "$TEMP" |
37 |
eval set -- "$TEMP" |
37 |
|
38 |
|
38 |
workdir= |
39 |
workdir= |
39 |
deps_file= |
40 |
deps_file= |
40 |
langs= |
41 |
langs= |
41 |
update= |
42 |
update= |
|
|
43 |
target=$SEPARCH |
42 |
profile="default" |
44 |
profile="default" |
43 |
while :; do |
45 |
while :; do |
44 |
case "$1" in |
46 |
case "$1" in |
Lines 61-66
Link Here
|
61 |
-u|--update) |
63 |
-u|--update) |
62 |
update=1 |
64 |
update=1 |
63 |
;; |
65 |
;; |
|
|
66 |
-t|--target) |
67 |
shift |
68 |
target="$1" |
69 |
;; |
64 |
--) shift; break |
70 |
--) shift; break |
65 |
;; |
71 |
;; |
66 |
*) "unrecognized option: $1" |
72 |
*) "unrecognized option: $1" |
Lines 71-83
Link Here
|
71 |
done |
77 |
done |
72 |
|
78 |
|
73 |
WORKDIR=$@ |
79 |
WORKDIR=$@ |
|
|
80 |
APTBOX_OPTIONS= |
74 |
|
81 |
|
75 |
[ -z "$WORKDIR" ] && print_usage 0 |
82 |
[ -z "$WORKDIR" ] && print_usage 0 |
76 |
|
83 |
|
77 |
[ -d "$WORKDIR" ] || mkdir -p "$WORKDIR" |
84 |
[ -d "$WORKDIR" ] || mkdir -p "$WORKDIR" |
78 |
|
85 |
|
|
|
86 |
[ -z "$target" ] || APTBOX_OPTIONS="$APTBOX_OPTIONS --target=$target" |
87 |
|
88 |
[ -z "$aptconf" ] || APTBOX_OPTIONS="$APTBOX_OPTIONS --apt-config=$aptconf" |
89 |
|
79 |
[ -d "$WORKDIR/aptbox" ] && rm -Rf "$WORKDIR/aptbox" |
90 |
[ -d "$WORKDIR/aptbox" ] && rm -Rf "$WORKDIR/aptbox" |
80 |
/usr/bin/mkaptbox --target=$SEPARCH $WORKDIR |
91 |
echo "Hashers architecture setted to $target" |
|
|
92 |
/usr/bin/mkaptbox $APTBOX_OPTIONS $WORKDIR |
81 |
|
93 |
|
82 |
[ -z "$update" ] || exit 0 |
94 |
[ -z "$update" ] || exit 0 |
83 |
|
95 |
|