File: mergelib.sh

package info (click to toggle)
nullmailer 1:2.2-3
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 1,228 kB
  • sloc: cpp: 6,785; sh: 504; makefile: 221; perl: 184
file content (16 lines) | stat: -rw-r--r-- 333 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
set -e
archive="$1"
shift
tmpdir=".libmerge.$archive.$$.$RANDOM.$USER"
mkdir "$tmpdir"
cd "$tmpdir"
trap 'cd ..; rm -rf "$tmpdir"' EXIT
for input in "$@"; do
	dir="`basename "$input"`"
	mkdir "$dir"
	cd "$dir"
	"${AR:-ar}" x ../../"$input"
	cd ..
done
"${AR:-ar}" rc ../"$archive" `LC_ALL=C ls */*`
"${RANLIB:-ranlib}" ../"$archive"