forked from alireza-amirsamimi/pdmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
40 lines (37 loc) · 1.43 KB
/
install
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
#!/bin/bash
#install Persepolis Download Manager
clear screen
echo "############################################################"
echo "#### Welcome to Persepolis Download Manager installation ###"
echo "############################################################"
user=$HOME
program_path="$user/.persepolis_download_manager_terminal"
install_path=`pwd`
echo "mkdir $program_path"
mkdir $program_path >/dev/null 2>&1
echo "cp -R -f $install_path/files/* $program_path"
cp -R -f $install_path/files/* $program_path
echo "Exec=$user/.persepolis_download_manager_terminal/pdm_zenity" >>$program_path/Persepolis.desktop
echo "Icon=$user/.persepolis_download_manager_terminal/icon.png" >>$program_path/Persepolis.desktop
chmod +x $program_path/pdmt
chmod +x $program_path/PDMT
chmod +x $program_path/PDM
chmod +x $program_path/pdmt_flashgot_gtk
chmod +x $program_path/pdm_flashgot_gtk
chmod +x $program_path/pdm_zenity
chmod +x $program_path/Persepolis.desktop
if [ ! -f ~/.Xresources ];then
cp -R -f ~/.persepolis_download_manager_terminal/Xresources ~/.Xresources
xrdb -merge ~/.Xresources
fi
echo "sudo mv -f $program_path/pdmt /usr/bin"
echo "sudo mv -f $program_path/Persepolis.desktop /usr/share/applications"
sudo mv -f $program_path/pdmt /usr/bin
sudo mv -f $program_path/Persepolis.desktop /usr/share/applications
if [ "$?" -eq "0" ]
then
echo "Installation compeleted"
else
echo "Installation Failed!"
fi
exit