1 |
Looks like Chobby is root only:
|
1 |
Looks like Chobby is root only:
|
2 |
\n
|
2 |
\n
|
3 |
~ % ls /usr/lib/x86_64-linux-gnu/Zero-K/ -la
|
3 |
~ % ls /usr/lib/x86_64-linux-gnu/Zero-K/ -la
|
4 |
total 4536
|
4 |
total 4536
|
5 |
drwxr-xr-x 2 root root 4096 loka 10 14:48 .
|
5 |
drwxr-xr-x 2 root root 4096 loka 10 14:48 .
|
6 |
drwxr-xr-x 156 root root 131072 loka 10 14:48 ..
|
6 |
drwxr-xr-x 156 root root 131072 loka 10 14:48 ..
|
7 |
-rwxr--r-- 1 root root 4503040 elo 9 14:43 Chobby.exe
|
7 |
-rwxr--r-- 1 root root 4503040 elo 9 14:43 Chobby.exe
|
8 |
\n
|
8 |
\n
|
9 |
But the script has been marked user owned:
|
9 |
But the script has been marked user owned:
|
10 |
\n
|
10 |
\n
|
11 |
~ % ls /usr/bin/Zero-K/ -la
|
11 |
~ % ls /usr/bin/Zero-K/ -la
|
12 |
total 112
|
12 |
total 112
|
13 |
drwxrwxr-x 2 lagerspe lagerspe 4096 loka 10 15:00 .
|
13 |
drwxrwxr-x 2 lagerspe lagerspe 4096 loka 10 15:00 .
|
14 |
drwxr-xr-x 3 root root 102400 loka 10 15:00 ..
|
14 |
drwxr-xr-x 3 root root 102400 loka 10 15:00 ..
|
15 |
-rwxrwxr-x 1 lagerspe lagerspe 311 loka 10 15:00 Zero-K
|
15 |
-rwxrwxr-x 1 lagerspe lagerspe 311 loka 10 15:00 Zero-K
|
16 |
\n
|
16 |
\n
|
17 |
Your current script is this:
|
17 |
Your current script is this:
|
18 |
\n
|
18 |
\n
|
19 |
#!/bin/sh
|
19 |
#!/bin/sh
|
20 |
fullPath=$HOME/Zero-K
|
20 |
fullPath=$HOME/Zero-K
|
21 |
symlinkpath=$HOME/Zero-K
|
21 |
symlinkpath=$HOME/Zero-K
|
22 |
wgetpath=/usr/lib/x86_64-linux-gnu/Zero-K
|
22 |
wgetpath=/usr/lib/x86_64-linux-gnu/Zero-K
|
23 |
if [ ! -d "$fullPath" ];
|
23 |
if [ ! -d "$fullPath" ];
|
24 |
then mkdir "$fullPath"
|
24 |
then mkdir "$fullPath"
|
25 |
#echo "v1"
|
25 |
#echo "v1"
|
26 |
fi
|
26 |
fi
|
27 |
cd $HOME/Zero-K
|
27 |
cd $HOME/Zero-K
|
28 |
if [ ! -f "$symlinkpath/Chobby.exe" ]
|
28 |
if [ ! -f "$symlinkpath/Chobby.exe" ]
|
29 |
then
|
29 |
then
|
30 |
ln -s "$wgetpath/Chobby.exe" $symlinkpath
|
30 |
ln -s "$wgetpath/Chobby.exe" $symlinkpath
|
31 |
#else echo "v2"
|
31 |
#else echo "v2"
|
32 |
fi
|
32 |
fi
|
33 |
mono Chobby.exe
|
33 |
mono Chobby.exe
|
34 |
\n
|
34 |
\n
|
35 |
If we download Chobby for the user instead, it would change to this:
|
35 |
If we download Chobby for the user instead, it would change to this:
|
36 |
\n
|
36 |
\n
|
37 |
#!/bin/sh
|
37 |
#!/bin/sh
|
38 |
fullPath=$HOME/Zero-K
|
38 |
fullPath=$HOME/Zero-K
|
39 |
if
[
!
-d
"$fullPath"
];
|
39 |
|
40 |
then
mkdir
"$fullPath"
|
40 |
if
[
!
-d
"$fullPath"
]
|
|
|
41 |
then
|
|
|
42 |
mkdir "$fullPath"
|
41 |
fi
|
43 |
fi
|
42 |
cd
$HOME/Zero-K
|
44 |
|
|
|
45 |
cd "${fullPath}"
|
43 |
wget -N https://zero-k.info/lobby/Chobby.exe
|
46 |
wget -N https://zero-k.info/lobby/Chobby.exe
|
44 |
mono Chobby.exe
|
47 |
mono Chobby.exe
|
45 |
\n
|
48 |
\n
|
46 |
\n
|
49 |
\n
|
47 |
The icon, and application file would stay exactly the same. There would be no need to give non-root permissions to any files. Also no need to run installation scripts at deb install time.
|
50 |
The icon, and application file would stay exactly the same. There would be no need to give non-root permissions to any files. Also no need to run installation scripts at deb install time.
|
48 |
The deb just installs dependencies, and places this script to /usr/bin/Zero-K and the icon and desktop file to the right places.
|
51 |
The deb just installs dependencies, and places this script to /usr/bin/Zero-K and the icon and desktop file to the right places.
|
49 |
\n
|
52 |
\n
|
50 |
Can you package this? Let's see how it would work.
|
53 |
Can you package this? Let's see how it would work.
|