File: create_package

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (50 lines) | stat: -rwxr-xr-x 1,105 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash

if ! [ -f options ]; then 
  echo "Must run configure 1st"
  exit 1
fi

. options


# create the package
echo "Creating package."
eval `pkgsend open $pkgname`

pushd $basedir

# create/add directories
echo "Creating directories..."
for file in `find $contentdir -d`; do
  pkgsend add dir mode=0555 owner=root group=bin path="/$file"
done

# create/add all files
echo "Adding files..."
for file in `find $contentdir -type f`; do
  pkgsend add file $file
done

# set attribs for binary files
echo "Setting attributes for executable files..."
for file in `find $contentdir -perm /u=x -type f`; do
  pkgsend add file "$file" mode=0755 owner=root group=bin path="$file"
done

# set attribs for data files
echo "Setting attributes for data files..."
for file in `find $contentdir -perm /u=x -type f`; do
  pkgsend add file "$file" mode=0644 owner=root group=bin path="$file"
done

# add dependencies


# set pkg stuff
echo "Setting package info..."
pkgsend add set name=description value="$description"
pkgsend add set name=maintainer value="$maintainer"

echo "Closing transaction."
pkgsend close