Rev 148 | Rev 153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 148 | Rev 152 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #!/bin/bash
|
1 | #!/bin/bash -x
|
2 | 2 | ||
3 | #Company: PowerCraft Technology
|
3 | #Company: PowerCraft Technology
|
4 | #Author: Copyright Jelle de Jong <jelledejong@powercraft.nl>
|
4 | #Author: Copyright Jelle de Jong <jelledejong@powercraft.nl>
|
5 | #Note: Please send me an email if you enhanced the script
|
5 | #Note: Please send me an email if you enhanced the script
|
6 | #Version: 0.0.1
|
6 | #Version: 0.0.1
|
Line 15... | Line 15... | ||
15 | # This program is distributed in the hope that it will be useful,
|
15 | # This program is distributed in the hope that it will be useful,
|
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 | # GNU General Public License for more details.
|
18 | # GNU General Public License for more details.
|
19 | 19 | ||
- | 20 | # This is an evil hack
|
|
- | 21 | pwd="$PWD" |
|
- | 22 | pwd=${pwd%"working"*} |
|
- | 23 | pwd+="working/scripts/" |
|
- | 24 | cd $pwd |
|
- | 25 | ||
20 | if [ -n "$1" ] && [ "$1" == "update" ] |
26 | if [ -n "$1" ] && [ "$1" == "update" ] |
21 | then
|
27 | then
|
22 | OPTIONS+="-mmin -15"
|
28 | OPTIONS+="-mmin -1"
|
23 | fi
|
29 | fi
|
24 | 30 | ||
25 | if [ -z "$2" ] |
31 | if [ -z "$2" ] |
26 | then
|
32 | then
|
27 | DESTINATION="../gschem/sym/all" |
33 | DESTINATION="../gschem/sym/all" |
Line 34... | Line 40... | ||
34 | SOURCE="../gschem/sym/resources" |
40 | SOURCE="../gschem/sym/resources" |
35 | else
|
41 | else
|
36 | SOURCE="$1" |
42 | SOURCE="$1" |
37 | fi
|
43 | fi
|
38 | 44 | ||
- | 45 | echo "pwd: $PWD" |
|
- | 46 | ||
39 | find -P "$DESTINATION" -maxdepth 1 -type l -exec rm --verbose '{}' \; |
47 | find -P "$DESTINATION" -maxdepth 1 -type l -exec rm --verbose '{}' \; |
40 | 48 | ||
41 | unset list
|
49 | unset list
|
42 | list=($(find "$SOURCE" -maxdepth 3 $OPTIONS -type f -iname "*.sym")) |
50 | list=($(find "$SOURCE" -maxdepth 3 $OPTIONS -type f -iname "*.sym")) |
43 | 51 |