-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkpkg.sh
More file actions
executable file
·53 lines (38 loc) · 830 Bytes
/
Copy pathmkpkg.sh
File metadata and controls
executable file
·53 lines (38 loc) · 830 Bytes
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
51
52
53
#!/bin/bash
if [ $# -ne 2 ]
then
printf "Usage : $0 <package path> <source path>\n"
exit 1
fi
# if [ `whoami` != "root" ]
# then
# printf "\nPlease run this script as root\n"
# exit 1
# fi
EXE=$0
PKG=$1
PKG_TAR=${PKG/".gz"/}
echo $PKG_TAR
exit
SRC=$2
BKP_PATH=/home/amit/gdrive/slac/
7z x $PKG
# folder name:
foldername=`head -n 1 $pkgtar | awk -F/ '{print $1}'`
echo `pwd`
echo $foldername
tar xv $pkgtar
mv $src $foldername
rm $src
cd $foldername
executable=`ls -F | grep "*" | grep SlackBuild | sed 's/*//g'`
PRGNAM=`cat $executable | grep PRGNAM= | awk -F= '{print $2}'`
TAG=`cat $executable | grep TAG= | sed 's/[-_:$}{TAG=]//g'`
chmod +x $executable
$executable
echo 70
slackpack=`ls /tmp | grep $PRGNAM | grep $TAG`
mv $slackpack $backup
cd $backup
installpkg --menu --ask $slackpack
cd $origpath