File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ This directory is a bit different than the others, it's used to store useful scripts and snip-its which people have created over the years.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # #
3
+ # to-htdocs - copy a folder to the lampp htdocs folder
4
+ # Created by Barry Attwater.
5
+ # #
6
+
7
+ # #
8
+ # Usage: ./to-htdocs.sh <folder-to-copy>
9
+ # #
10
+
11
+ if [ -f $1 ]; then
12
+ cp -u -v " $PWD /$1 " " /opt/lampp/htdocs/$1 "
13
+ else
14
+ if [ ! -d " /opt/lampp/htdocs/$1 " ]; then
15
+ mkdir /opt/lampp/htdocs/$1
16
+ fi
17
+ cp -r -u -v " $PWD /$1 /" * " /opt/lampp/htdocs/$1 "
18
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # #
3
+ # wallpaper.sh - generate a gnome wallpaper xml definition from images in a directory
4
+ # Created by Barry Attwater
5
+ # #
6
+ # #
7
+ # Useage: cd my-photos && ~/scripts/wallpaper.sh
8
+ # #
9
+
10
+ if [ -f $PWD /baclground-1.xml ]
11
+ then
12
+ rm $PWD /background-1.xml
13
+ fi
14
+ declare -a array
15
+ list=$( ls)
16
+ c=0
17
+ for i in $list
18
+ do
19
+ array[c]=$i
20
+ # echo $c+$i
21
+ let c=$c +1
22
+ done
23
+ echo " <background>
24
+ <starttime>
25
+ <year>2009</year>
26
+ <month>08</month>
27
+ <day>04</day>
28
+ <hour>00</hour>
29
+ <minute>00</minute>
30
+ <second>00</second>
31
+ </starttime>" > background-1.xml
32
+ for (( count= 0 ; count< ${# array[@]} ; count++ ))
33
+ do
34
+ if [ " $count " -ne " 0" ]
35
+ then
36
+ echo " <to>$PWD /${array[count]} </to>
37
+ </transition>" >> background-1.xml
38
+ fi
39
+ echo " <static>
40
+ <duration>1795.0</duration>
41
+ <file>$PWD /${array[count]} </file>
42
+ </static>" >> background-1.xml
43
+ let lastcell=${# array[@]} -1
44
+ if [ " $count " -lt " $lastcell " ]
45
+ then
46
+ echo " <transition>
47
+ <duration>5.0</duration>
48
+ <from>$PWD /${array[count]} </from>" >> background-1.xml
49
+ fi
50
+ done
51
+ echo " </background>" >> background-1.xml
You can’t perform that action at this time.
0 commit comments