source: src-sh/pbi-manager/install.sh

Last change on this file was 2f562fd, checked in by Kris Moore <kris@…>, 8 months ago

Merge in the new PBING code

Remove old pc-metapkgmanager, will be replaced by "pbi" commands

Add new 'pc-pkg' command, used by AppCafe? or other processes that need
to install / upgrade packages, and want to use the libsh/ conflict
detection / removal

  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/bin/sh
2# pbi-manager installation script
3
4DEFAULT="/usr/local"
5
6if [ -z "$1" ] ; then
7        LB="${DEFAULT}" 
8else
9        LB="${1}" 
10fi
11
12DIR=`dirname $0`
13DIR=`realpath $DIR`
14cd ${DIR}
15
16# Install the app
17mkdir ${LB}/sbin >/dev/null 2>/dev/null
18cp pbi-manager ${LB}/sbin/pbi_info
19ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi_add
20ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi_delete
21ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi_icon
22ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi_makeindex
23ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi_updateindex
24ln -f ${LB}/sbin/pbi_info ${LB}/sbin/app
25ln -f ${LB}/sbin/pbi_info ${LB}/sbin/pbi
26
27# Set the new PREFIX / LOCALBASE
28if [ "$LB" != /usr/local ] ; then
29  sed -i '' "s|PROGBASE=/usr/local|PROGBASE=$LB|g" ${LB}/sbin/pbi_info
30fi
31
32# Install manpages
33mkdir -p ${LB}/man/man1 >/dev/null 2>/dev/null
34for i in `ls man1/`
35do
36  rm ${LB}/man/man1/${i}.gz >/dev/null 2>/dev/null
37  gzip -c man1/${i} > ${LB}/man/man1/${i}.gz
38done
39
40mkdir -p ${LB}/man/man5 >/dev/null 2>/dev/null
41for i in `ls man5/`
42do
43  rm ${LB}/man/man5/${i}.gz >/dev/null 2>/dev/null
44  gzip -c man5/${i} > ${LB}/man/man5/${i}.gz
45done
46
47if [ -d "${LB}/share/pbi-manager" ] ; then rm -rf "${LB}/share/pbi-manager" ; fi
48
49mkdir -p ${LB}/share/pbi-manager/ >/dev/null 2>/dev/null
50
51# Copy the icon
52mkdir -p ${LB}/share/pbi-manager/icons >/dev/null 2>/dev/null
53cp ${DIR}/icons/default.png ${LB}/share/pbi-manager/icons
54cp ${DIR}/icons/patch.png ${LB}/share/pbi-manager/icons
55
56# Copy the default repo key / config
57cp ${DIR}/repo/repokey.ssl ${LB}/share/pbi-manager/repokey.ssl
58cp ${DIR}/repo/pkgng-repo ${LB}/share/pbi-manager/pkgng-repo
59
60# Tickle the info command to setup default dirs
61${LB}/sbin/pbi_add >/dev/null 2>/dev/null
62
63cp ${DIR}/etc/pbi.conf ${LB}/etc/pbi.conf
Note: See TracBrowser for help on using the repository browser.