Debian Codegraph @

sublime/set_sublime-settings.sh

raw
1 #!/bin/bash
2 #
3 # Usage: /.set_sublime-settings.sh
4 # ( Run in "$BIOSYNTAX/sublime/" )
5 #
6 # bioSyntax.org v0.1
7 #
8 # Creates a copy of the bioSyntax default settings
9 # for each syntax.
10 #
11 # Used to apply changes in "bioSyntax.sublime-settings"
12 # as a default for every syntax
13 #
14 # Note:
15 # Ideally all bioSyntax syntax files will
16 # read the same "bioSyntax.sublime-settings" file
17 #
18 # In *nix this is done with `ln -s ` but that isn't
19 # a windows/*.nix compatible way of creating links
20 # to the same file.
21 #
22
23 TEMPLATE='bioSyntax.sublime-settings'
24
25 printf " Default bioSyntax.sublime-settings:\t$TEMPLATE\n"
26 # Generate a bioSyntax.sublime-settings
27 # file if one doesn't exist.
28
29 for SYNTAXFILE in $(ls *.sublime-syntax)
30 do
31 # Find each syntax definition file
32 SYNTAX=$(basename -as'.sublime-syntax' $SYNTAXFILE)
33 printf " Making .sublime-settings file for:\t$SYNTAX\n"
34
35 cp $TEMPLATE $SYNTAX".sublime-settings"
36
37 done