clean.sh 2.19 KB
Newer Older
1
2
3
4
5
6
if [ -e .vagrantfile ]
  then
    echo ".vagrantfile still exists. "
    echo "First run vagrant destroy if you want to create a new environment."
    exit
fi
7
8
9
10
if [ -e Vagrantfile ]
  then
    echo "Removing Vagrantfile, variable.sh and PHPStorm files."
    rm Vagrantfile
11
12
13
14
    if [ -e vagrant.log ]
      then
        rm vagrant.log
    fi
15
    rm manifests/variable.sh
16
    profiles="drupal7 drupal7alt drupal7lrel drupal7rel drupal7os"
17
18
19
20
21
    for profile in $profiles
    do
    rm phpstorm/$profile/.idea/deployment.xml
    rm phpstorm/$profile/.idea/webServers.xml
    rm phpstorm/$profile/.idea/php.xml
22
    rm phpstorm/$profile/.idea/vcs.xml
23
24
    rm phpstorm/$profile/.idea/workspace.xml
    rm phpstorm/$profile/.idea/.name
25
    rm phpstorm/$profile/.idea/inspectionProfiles/Project_Default.xml
26
27
28
29
30
    rm phpstorm/$profile/.idea/runConfigurations/FDSU1.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU2.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU3.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU4.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU5.xml
31
    rm -rf phpstorm/$profile/drupal/*
32
    done
33
34
35
36
37
38
39
    
    profiles="drupal8 drupal8alt"
    for profile in $profiles
    do
    rm phpstorm/$profile/.idea/deployment.xml
    rm phpstorm/$profile/.idea/webServers.xml
    rm phpstorm/$profile/.idea/php.xml
40
    rm phpstorm/$profile/.idea/vcs.xml
41
42
43
44
45
46
47
48
49
    rm phpstorm/$profile/.idea/workspace.xml
    rm phpstorm/$profile/.idea/.name
    rm phpstorm/$profile/.idea/inspectionProfiles/Project_Default.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU1.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU2.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU3.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU4.xml
    rm phpstorm/$profile/.idea/runConfigurations/FDSU5.xml
    rm -rf phpstorm/$profile/drupal/*
50
51
52
53
54
55
56
    if [ -e .csslintrc ]
      then
        rm phpstorm/$profile/drupal/.csslintrc
        rm phpstorm/$profile/drupal/.eslintignore
        rm phpstorm/$profile/drupal/.eslintrc.json
        rm phpstorm/$profile/drupal/.gitattributes
    fi
57
58
    done
    
59
60
61
62
    echo "All relevant files have been deleted."
 else
   echo "Vagrantfile doesn't exist so no files where deleted."
fi