setup.sh added

This commit is contained in:
victor 2021-01-06 16:27:17 +03:30
parent fb1f5331d1
commit 55481848c1
5 changed files with 151 additions and 11 deletions

View File

@ -47,18 +47,24 @@ the installer scripts use a virtual drive of wine and makes a new `winprefix` fo
first of all, you need to clone the repository with this command:
```bash
git clone https://github.com/Gictorbit/illustratorCClinux.git
cd illustratorCClinux/scripts
cd illustratorCClinux
chmod +x setup.sh
./setup.sh
```
then you can easily run `illustratorSetup.sh` script to install illustrator cc on your Linux distro
then you can easily run `setup.sh` script to install illustrator cc on your Linux distro
```bash
chmod +x illustratorSetup.sh
./illustratorSetup.sh
```
<div align="center" class="tip" markdown="1" style>
![setup screenshot](images/setup-screenshot.png)
</div>
you can use `-d` to specify the installation path, and `-c` for the cache directory.
for example:
```bash
cd scripts
chmod +x illustratorSetup.sh
./illustratorSetup.sh -d /mnt/storage/illustratorSetup.sh
```
or with c flag

19
images/banner Normal file
View File

@ -0,0 +1,19 @@

                     ┏━━━━━━━━━━━━━━━━━━━━━━━━━┫ Illustrator CC Installer ┣━━━━━━━━━━━━━━━━━━━━━━━━┓
                     ┃                                                                             ┃
  ███████████████████████████                                                                      ┃
  ██                       ██        1- Install Illustrator CC            (reinstall/repair)       ┃
  ██          ▟████ ▟█▙    ██                                                                      ┃
  ██         ▟█████ ▜█▛    ██        2- reset Illustrator                  (reset settings)        ┃
  ██        ▟██████        ██                                                                      ┃
  ██       ▟██▛ ███ ███    ██        3- configure virtual drive               (winecfg)            ┃
  ██      ▟██▛  ███ ███    ██                                                                      ┃
  ██     ▟██▛   ███ ███    ██        4- uninstall Illustrator                                      ┃
  ██    ▟██████████ ███    ██                                                                      ┃
  ██   ▟██▛     ███ ███    ██        5- exit                                                       ┃
  ██                       ██                                                                      ┃
  ███████████████████████████                                                                      ┃
                      ┃                                                                            ┃
                      ┗━━━━━━━━━━━━┫ https://github.com/Gictorbit/illustratorCClinux ┣━━━━━━━━━━━━━┛
                      
                    

19
images/banner.txt Normal file
View File

@ -0,0 +1,19 @@
┏━━━━━━━━━━━━━━━━━━━━━━━━━┫ Illustrator CC Installer ┣━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
███████████████████████████ ┃
██ ██ 1- Install Illustrator CC (reinstall/repair) ┃
██ ▟████ ▟█▙ ██ ┃
██ ▟█████ ▜█▛ ██ 2- reset Illustrator (reset settings) ┃
██ ▟██████ ██ ┃
██ ▟██▛ ███ ███ ██ 3- configure virtual drive (winecfg) ┃
██ ▟██▛ ███ ███ ██ ┃
██ ▟██▛ ███ ███ ██ 4- uninstall Illustrator ┃
██ ▟██████████ ███ ██ ┃
██ ▟██▛ ███ ███ ██ 5- exit ┃
██ ██ ┃
███████████████████████████ ┃
┃ ┃
┗━━━━━━━━━━━━┫ https://github.com/Gictorbit/illustratorCClinux ┣━━━━━━━━━━━━━┛

100
setup.sh Executable file
View File

@ -0,0 +1,100 @@
#!/usr/bin/env bash
function main() {
#print banner
banner
#read inputs
read_input
let answer=$?
case "$answer" in
1)
echo "run illustrator CC Installation..."
echo -n "using winetricks for component installation..."
run_script "scripts/illustratorSetup.sh" "illustratorSetup.sh"
;;
2)
echo -n "reset illustrator..."
run_script "scripts/resetIllustrator.sh" "resetIllustrator.sh"
;;
3)
echo "run winecfg..."
echo -n "open virtualdrive configuration..."
run_script "scripts/winecfg.sh" "winecfg.sh"
;;
4)
echo -n "uninstall illustrator CC ..."
run_script "scripts/uninstaller.sh" "uninstaller.sh"
;;
5)
echo "exit setup..."
exitScript
;;
esac
}
#argumaents 1=script_path 2=script_name
function run_script() {
local script_path=$1
local script_name=$2
wait_second 5
if [ -f "$script_path" ];then
echo "$script_path Found..."
chmod +x "$script_path"
else
error "$script_name not Found..."
fi
cd "./scripts/" && bash $script_name
unset script_path
}
function wait_second() {
for (( i=0 ; i<$1 ; i++ ));do
echo -n "."
sleep 1
done
echo ""
}
function read_input() {
while true ;do
read -p "[choose an option]$ " choose
if [[ "$choose" =~ (^[1-5]$) ]];then
break
fi
warning "choose a number between 1 to 5"
done
return $choose
}
function exitScript() {
echo "Good Bye :)"
}
function banner() {
local banner_path="$PWD/images/banner"
if [ -f $banner_path ];then
clear && echo ""
cat $banner_path
echo ""
else
error "banner not Found..."
fi
unset banner_path
}
function error() {
echo -e "\033[1;31merror:\e[0m $@"
exit 1
}
function warning() {
echo -e "\033[1;33mWarning:\e[0m $@"
}
main

View File

@ -1,7 +1,3 @@
update readme
add if exist to save_path and load_path functions
add reset illustrator option
add setup.sh script
add shared wine virtual drive with photoshop on one machine
add link mirror in json file
loadpath function enhancement check if file exist