Affichage des articles dont le libellé est bash. Afficher tous les articles
Affichage des articles dont le libellé est bash. Afficher tous les articles

Zentube

Another variation on the theme of zenity. I honestly like the way you can make simple front-ends. In addition, I'm doing something with youtube again, or more precisely, I'm doing stuff with youtube-dl.

So, the problem with youtube is that if you don't have Internet access, you obviously can't really use it, and there are certain instances where it'd come in handy. One such instance is when you're doing language teaching in an Internet-bereft classroom.

So there's youtube-dl to get some videos downloaded, but a person is not always in the mood for fiddling with the shell when preparing their lesson material.

Hence, this script provides the simples of interfaces to download videos via youtube-dl. That's pretty much it. Anyway, I think it's simple and does its job.

Oh, yeah, I played around with the idea of automatically installing a package if it is not available at the time of execution. It's a sort of experiment, to see if it can be done at all. I'm not sure how effective this is though. And it depends on apt and gksudo.

The code:
1  #!/bin/bash
2  #
3  # Zentube
4  #
5  # A simple GUI front-end to youtube-dl. All you need to do is run it,
6  # and put in the address of the video, and the back-end tries to 
7  # download the video.
8  #
9  # Parameters:
10 #   None
11 
12 # Requires:
13 #   youtube-dl  (apt:youtube-dl)
14 #   zenity      (apt:zenity)
15 #   gksudo & apt  -- if you want youtube-dl installed automatically
16 #
17 # Author:
18 #   Konrad Siek <konrad.siek@gmail.com>
19 #
20 # License:
21 #
22 # Copyright 2008 Konrad Siek.
23 
24 # This program is free software: you can redistribute it and/
25 # or modify it under the terms of the GNU General Public 
26 # License as published by the Free Software Foundation, either 
27 # version 3 of the License, or (at your option) any later 
28 # version.
29 
30 # This program is distributed in the hope that it will be 
31 # useful, but WITHOUT ANY WARRANTY; without even the implied 
32 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
33 # PURPOSE. See the GNU General Public License for more 
34 # details.
35 
36 # You should have received a copy of the GNU General Public 
37 # License along with this program. If not, see 
38 # <http://www.gnu.org/licenses/>. 
39 
40 # The downloader backend.
41 PACKAGE=youtube-dl
42 
43 # Output information.
44 OUTPUT_DIR=~/Videos/
45 EXTENSION=.flv
46 TEMP_FILE=/tmp/$(basename $0).XXXXXXXXXX
47 
48 # The quality of the output file can be adjusted here, or you can comment 
49 # out this setting altogether, to get the default.
50 QUALITY=--best-quality 
51 
52 # Exit code constants.
53 SUCCESS=0
54 INSTALLATION_ABORTED=1
55 INSTALLATION_FAILED=2
56 INVALID_VIDEO_ADDRESS=4
57 INVALID_OUTPUT_DIRECTORY=8
58 BACKEND_ERROR=16
59 
60 # This is a convenience installer for apt-using distros, e.g. Ubuntu.
61 if [ -z "$(which $PACKAGE)" ]
62 then
63     # Ask whether to attempt automatic install of the missing package.
64     # If the answer is no, then quit with an error.
65     zenity --question \
66         --title="Automatic installation" \
67         --text="Can't find <b>$PACKAGE</b>. Should I try installing it?" \
68     || exit $INSTALLATION_ABORTED
69     
70     # Try installing the missing package, or quit with an error if the
71     # attempt is failed.
72     gksudo "apt-get install $PACKAGE" || exit $INSTALLATION_FAILED
73 fi
74 
75 # Ask user for the URL of the video.
76 url=$(\
77     zenity --entry \
78     --title="Video address" \
79     --text="What is the address of the video?" \
80 )
81 # If no URL is given, then quit.
82 -z "$url" ] && exit $INVALID_VIDEO_ADDRESS
83 
84 # Move to the output directory, create it i necessary.
85 mkdir -p "$OUTPUT_DIR" || exit $INVALID_OUTPUT_DIRECTORY
86 cd "$OUTPUT_DIR"
87 
88 # Make a temporary file to collect error messages from the downloader.
89 temp_file=$(mktemp $TEMP_FILE)
90 
91 # Run the downloader.
92 $PACKAGE $QUALITY --title "$url" 2>"$temp_file" | \
93     zenity --progress --pulsate --auto-kill --auto-close --text="Downloading..."
94 
95 # Check for errors, and display a success of error dialog at the end.
96 errors=$(cat $temp_file)
97 
98 if [ -z "$errors" ] 
99 then
100    # Display successful info.
101    zenity --info --text="Download successful!"
102    
103    # Remove temporary file.
104    unlink "$temp_file"
105    
106    # Exit successfully.
107    exit $SUCCESS
108else
109    # Display error dialog.
110    zenity --error --text="$errors"
111    
112    # Remove temporary file.
113    unlink "$temp_file"
114    
115    # Exit with an error code.
116    exit $BACKEND_ERROR
117fi


The code is also available at GitHub as bash/zentube.
Continue Reading...

Zenspeak

You can give this one to children. It makes them noisier.

This one's just a simple interface to either espeak or festival: it asks you what to say via zenity and then says it. It doesn't take any arguments, so you start it up with a simple:

./zenspeak

In summary, it's not exactly dragon magic.

The code:
#!/bin/bash

# Zenspeak
#
# Provides a simple graphical (Gtk) interface to a speech production system:
# either espeak or festival. It's really simple too: you put in some text, 
# the text is spoken. When you put in zero text, the program ends.

# Parameters:
10#   None
11#
12# Depends:
13#   espeak      (apt:espeak)
14#   festival    (apt:festival)
15#   zenity      (apt:zenity)
16#
17# Author:
18#   Konrad Siek <konrad.siek@gmail.com>
19#
20# License information:
21#
22# This program is free software: you can redistribute it and/or modify
23# it under the terms of the GNU General Public License as published by
24# the Free Software Foundation, either version 3 of the License, or
25# (at your option) any later version.
26#
27# This program is distributed in the hope that it will be useful,
28# but WITHOUT ANY WARRANTY; without even the implied warranty of
29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30# GNU General Public License for more details.
31#
32# You should have received a copy of the GNU General Public License
33# along with this program. If not, see <http://www.gnu.org/licenses/>.
34#
35# Copyright 2009 Konrad Siek
36
37# System for production of sound is selected by the parameter, 
38# or the defaut is used if none were specified.
39SYSTEM_DEFAULT=espeak
40SYSTEM=`(( $# == 0 )) && echo "$SYSTEM_DEFAULT" || echo "$1"`
41echo $SYSTEM
42
43# System dependent settings for espeak:
44espeak_speed=120            # default: 160
45espeak_pitch=60            # 0-99, default: 50
46espeak_amplitude=20            # 0-20, default: 10
47espeak_voide=english     # list of voices: `espeak --voices`
48espeak_variant=f2            # m{1,6}, f{1,4}
49
50# I'm completely pants when it comes to setting up festival, so I won't 
51# even attempt it here.
52
53while true
54do
55    # Show dialog and get user input.
56    something=`zenity --entry --title="Say something..." --text="Say:"`
57    
58    # If no user input or cancel: bugger off (and indicate correct result).
59    if [ -z "$something" ]
60    then
61        exit 0
62    fi
63
64    # Put the input through either espeak or festival.
65    if [ "$SYSTEM" == "espeak" ] 
66    then
67        # Note: the sound is padded within pulse, so that it can be 
68        # played simultaneously with other sources.
69        padsp espeak \
70            -a $espeak_amplitude \
71            -p $espeak_pitch \
72            -s $espeak_speed \
73            -v $espeak_voice+$espeak_variant \
74            "$something"
75    elif [ "$SYSTEM" == "festival" ]
76    then
77        # Incidentally, that's all I know about festival.
78        echo "$something" | festival --tts
79    fi    
80done


The code is also available at GitHub as bash/zenspeak.
Continue Reading...

Commenter

I really don't have the time to write scripts recently, but this one will definitely save me some time tomorrow.

So, hey! I started this a while back when I was doing another one of those damn big Java projects, and I had to stick a bunch of generic comments to the beginning of each file, so it's (slightly more) compliant with the code convention. Alas, I didn't have the attention span to finish it then, and I just wrote the comments by hand.

But the problem reared its ugly head yet again, so I took the time to finish the script, and now I have one menial task less to do!

Here's how it works.

Supposing you've got a big Java project that needs to get those pesky comments included, you whip out the Commenter and go:

./commenter \
--author "Doctor Steve" \
--version 1.5 \
--output-dir BigJavaProject/commented \
BigJavaProject/src


And you're good to go! Every file from BigJavaProject/src will be copied (with the full package path) into BigJavaProject/commented while prepending a comment.

And, as an example, for a file called JavaParser.java, the comment will look something like:
/*
* JavaParser
*
* Version 1.5
*
* Date 8 July 2009
*
* Copyright 2009 Doctor Steve
*/


And if you want to know more, read the comments, or the entire code. I mean, if you're interested in this one, you must be a developer anyway.

Oh! and it's GPL.

And here's the code:

1  #!/bin/bash
2  #
3  # Commenter
4  #
5  # A simple program to include a generic c-style header comment to a
6  # Java project. The comment includes the classname, the version 
7  # number and date, and the copyright notice -- as specified in the 
8  # code convention for the Java language, available at: 
9  # <http://java.sun.com/docs/codeconv/>
10 #
11 # Parameters:
12 #   -o|--output-dir output directory for the generated files,
13 #                   default: current working directory, i.e., HERE;
14 #   -a|--author     set author for the copyright notice,
15 #                   default: the current system user;
16 #   -y|--year       set the year for the copyright notice,
17 #                   default: the current year;
18 #   -d|--date       set date for of creation for the comment,
19 #                   default: the current date;
20 #   -v|--version    set the default version for all files,
21 #                   default: 1.0;
22 #   --verbose       display additional info.
23 # Author:
24 #   Konrad Siek <konrad.siek@gmail.com>
25 #
26 # License information:
27 #
28 # This program is free software: you can redistribute it and/or modify
29 # it under the terms of the GNU General Public License as published by
30 # the Free Software Foundation, either version 3 of the License, or
31 # (at your option) any later version.
32 #
33 # This program is distributed in the hope that it will be useful,
34 # but WITHOUT ANY WARRANTY; without even the implied warranty of
35 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36 # GNU General Public License for more details.
37 #
38 # You should have received a copy of the GNU General Public License
39 # along with this program. If not, see <http://www.gnu.org/licenses/>.
40 #
41 # Copyright 2009 Konrad Siek
42 
43 # Sets unset variables to some presets.
44 function initiate_presets() {
45     [ "$output_dir" == "" ] && output_dir=$(pwd)
46     [ "$date" == "" ] && date=$(date +'%-d %B %Y')
47     [ "$year" == "" ] && year=$(date +%Y) 
48     [ "$version" == "" ] && version=1.0
49     [ "$author" == "" ] && author=$(whoami)
50     [ "$extension" == "" ] && extension=.java
51 }
52 
53 # Print an error to stderr
54 # @param error message
55 function syserr() {
56     echo "$0: $@" >& 2
57 }
58 
59 # Generate a single comment from a list of strings.
60 # @param zero or more strings
61 # @return c-style comment string
62 function generate_comment() {   
63     echo "/*"    
64     if (( $# == 0 ))
65     then
66         echo " * "
67     else
68         while (( $# >  0 ))
69         do
70             echo " * $1"
71             if (( $# >  1 ))
72             then
73                 echo " * "
74             fi
75             shift
76         done
77     fi    
78     echo " */"
79 }
80 
81 # Copy a file with and append a generated file comment.
82 # @param absolute file path
83 function comment () {
84     comment=$( \
85         generate_comment \
86             "$(basename "$1" $extension)" \
87             "Version $version" \
88             "Date $date" \
89             "Copyright $year $author" \
90     )
91 
92     package=$(dirname ${1:${#base_dir}})
93     output=$output_dir$package/$(basename "$1")
94 
95     if [ $verbose ]
96     then 
97         echo "Commenting file '$1' as '$output'."
98     fi
99 
100    mkdir -p $(dirname "$output")
101    echo -e "$comment" | cat - "$1" > "$output"
102}
103
104# Apply transformation to an entire project or directory.
105# @param absolute directory path
106function comment_dir () {
107    base_dir="$1"
108    find "$1" -type f -name "*$extension" | \
109    while read f
110    do
111        comment "$f"
112    done
113}
114
115# Apply transformation to a file or directory.
116# @param resource path
117function comment_resource () {
118    if [ ! \( -e "$1" \) ] 
119    then
120        syserr "Resource '$1' does not exist."
121        return 1
122    fi
123
124    input=$(readlink -f "$1")
125    if [ -d "$input" ]
126    then
127        comment_dir "$input"
128    else
129        base_dir=$(dirname "$input")
130        comment "$input"
131    fi    
132}
133
134# Parse options
135options=$( \
136    getopt \
137    -o o:v:a:d:y:e: \
138    --long output-dir:,version:,author:,date:,year:,extension:,verbose \
139    -n $0 -- "$@" \
140)
141
142# Stop if there's some sort of problem
143if [ $? != 0 ] 
144then
145    syserr "Argh! Parsing went pear-shaped!"
146    exit 1
147fi
148
149# Set the parsed command options
150eval set -- "$options"
151
152# Setup selected options
153while true
154do
155    case "$1" in
156    -o|--output-dir
157        output_dir="$2"
158        shift 2 
159    ;;
160    -v|--version)
161        version="$2"
162        shift 2
163    ;;
164    -a|--author)
165        author="$2"
166        shift 2
167    ;;
168    -y|--year)
169        year="$2"
170        shift 2
171    ;;
172    -d|--date)
173        date="$2"
174        shift 2
175    ;;
176    -e|--extension)
177        [ ${2:0:1} == . ] && extension="$2" || extension=".$2"
178        shift 2
179    ;;
180    --verbose)
181        verbose=true
182        shift 1
183    ;;
184    --) 
185        # Stop parsing options
186        shift
187        break
188     ;;
189    *) 
190        # Weird error
191        syserr "The end of the world is nigh!"
192        exit 2 
193    ;;
194    esac
195done
196
197# Process configuration
198initiate_presets
199
200if [ $verbose ]
201then
202    echo "Output: $output_dir"
203    echo "Date: $date"
204    echo "Version: $version"
205    echo "Author: $author"
206    echo "Year: $year"
207    echo "Extension: $extension"
208fi
209
210# Process inputs
211if [ "$#" == 0 ] 
212then
213    # If no paths were given, use the current directory.
214    comment_resource .
215else
216    # If some paths were given, comment them each individually.
217    for arg
218    do 
219        comment_resource "$arg"
220    done
221fi


The code is also available at GitHub as bash/commenter.
Continue Reading...

Supply

Update: Added sorting and changed the order of assigning values to variables, so that manually set variables through command line options override those from the .supplyrc file. Oh, and also I added the verbose switch. (Apr 27, 11:44 PM)

Supposing you go on trains a lot, and you listen to audiobooks and/or podcasts when you do. I know of two problems that tend to arise then.
  • The trains are too damn loud and you can't actually hear your shows, even if you set your audio player on full blast and your hands over your ears.

  • You do this way too often and you get tired of shifting files by hand, especially if you've gotta do this file by file, since your audio player cares about the order in which files are loaded onto it, and your file system does not cooperate. Geek.
So it would be good if you could automate the process and apply some extra volume! And this is what this script does.

I've been putting it together for several weeks (I actually started last year and then got bored), scripting during lectures and so forth (when I should've really been paying attention to the complexities of MPEG-7) and came up with this wild bunch of code, all tied together.

It seems to work too!

It has several options:
  • Target is the device you want to put stuff on. In my case this can be /media/disk or /media/KINGSTON. I suggest fixing this up in the script itself (line 40) or, preferably, in the config file (more on that later).

  • Subdir(ectory) is a directory on the device that you want to put stuff in. I'd not set this up to fixed values anywhere, and would call it Books and Music. This would result in the files being placed into /media/disk/Books and /media/disk/Music, respectivelly.

  • Quiet will make the script not print out any info comments. It will still print out various warnings and assorted errors - if you want to desperately get rid of those redirect the error stream to /dev/null, like to ./supply 2> /dev/null

  • Gain probably the most important bit for us train-and-tram commuters. Sets a tag in ogg and mp3 files that tells the player to play louder. Setting gain to 5 will make it really loud... if you set it too loud it will start crackling like the bejesus...
Yeah, quite a few options, even if I say so myself...

But the purpose of this exercise to have it all simple! And that's where to config file comes in. You take the file called .supplyrc and put it in your home (~) directory (see line 41 in the source code). You put in the values you like into the config file, and you don't have to worry too much about configuration anymore! Isn't life grand?

So here's a simple example of use (supposing you're using my config file, as shown below):
./supply ~/Books/Nineteen\ Eighty-Four/ -s Books -g 2
This will put the audiobook into the directory /media/disk/Books/Nineteen\ Eighty-Four and increase the gain to 2, so it will be a bit louder.

Oh yeah! I almost forgot. You need to acquire vorbisgain and/or mp3gain to make oggs and/or mp3s louder. I usually install them via apt:
sudo apt-get install mp3gain vorbisgain

Gain modification will only work with oggs and mp3, and they have to have the appropriate extensions (because I have to tell them apart somehow) - ogg or oga, or mp3.

And another thing, this one's GPL v3 or more.

Here's the config file I made for myself and as a general template:
#!/bin/bash
# Filename: ~/.supplyrc
# Default settings for supply.sh

# Path to the device. Where to put the files by default. 
# Needs to be a directory and end in a slash (/).
target=/media/disk/

# Where to put the files on the device pointed to by $target.
10# Needs to be a directory and end in a slash (/).
11subdir=Books/
12
13# Gain setup. Leave commented out to have no gain by default.
14# An arbitrary number.
15# gain=0
16
17# Quiet mode: print messages, or not.
18# Allowed values: true, false.
19# quiet=true


And here's the code:
1  #!/bin/bash
2  
3  # Supply
4  #
5  # A script to supply your audio player with new audio files, with the
6  # extra ability to control gain in oggs and mp3s.
7  #
8  # Usage:
9  #   t, target=<DIR> - Move media onto specified device
10 #   d, subdirectory=<DIR> - Move media to a dir on the device (opt.)
11 #   c, config=<FILE> - Apply specified configuration file (opt.)
12 #   g, gain=<NUMBER - Apply specified gain value to all files (opt.)
13 #   q, quiet - Do not print info messages (but still print warnings)
14 #   v, verbose - Print info messages (opposite of quiet)
15 #   <FILE LIST> - Act on these files and directories
16 #
17 # Requires:
18 #   vorbisgain
19 #   mp3gain
20 #
21 # Addendum regarding Ogg gain controls:
22 #   vorbisgain input files must be Ogg Vorbis I files with 1 or 2  
23 #   channels and  a  sample  rate  of 48 kHz, 44.1 kHz, 32 kHz, 24 
24 #   kHz, 22050 Hz, 16 kHz, 12 kHz, 11025 Hz or 8 kHz. If  an  input
25 #   file  contains  multiple streams  (i.e., it is chained), the 
26 #   streams must all have the same format, in terms of sampling 
27 #   frequency and number of channels. All streams in a chained file 
28 #   are processed, but  the ReplayGain tags are only written to (or 
29 #   removed from) the first stream. 
30 #                                               -- vorbisgain(1)
31 # License:
32 #   Copyright 2009 Konrad Siek <konrad.siek@gmail.com>
33 #   This program is free software: you can redistribute it and/or 
34 #   modify it under the terms of the GNU General Public License as 
35 #   published by the Free Software Foundation, either version 3 of 
36 #   the License, or (at your option) any later version. See 
37 #   <http://www.gnu.org/licenses/> for details.
38 
39 # Default settings
40 target=/media/disk
41 config=~/.supplyrc
42 source=.
43 quiet='false'
44 #subdir=Books
45 
46 # Echo function with possible silencing
47 function sysout {
48     if [ "$quiet" != 'true' ]
49     then
50         echo "$0: $1"
51     fi
52 }
53 
54 # Echo function redirecting to standard error
55 function syserr {
56     echo "$0: $1" >& 2
57 }
58 
59 # Parse options
60 options=$(\
61     getopt \
62     -o c:t:g:d:q:v \
63     --long gain:,target:,config:,subdirectory:,quiet,verbose \
64     -n $0 -- "$@" \
65 )
66 
67 # Stop if there's some sort of problem
68 if [ $? != 0 ] 
69 then
70     syserr "Argh! Parsing went pear-shaped!"
71     exit 1
72 fi
73 
74 # Set the parsed command options
75 eval set -- "$options"
76 
77 # Setup selected options
78 while [ 1 ]
79 do
80     case "$1" in
81     -c|--config
82         config=$2
83         shift 2 
84     ;;
85     -g|--gain)
86         custom_gain=$2
87         shift 2
88     ;;
89     -t|--target)
90         custom_target=$2
91         shift 2
92     ;;
93     -d|--subdirectory)
94         custom_subdir=$2
95         shift 2
96     ;;
97     -q|--quiet)
98         custom_quiet='true'
99         shift 
100    ;;
101    -v|--verbose)
102        custom_quiet='false'
103        shift 
104    ;;
105    --) 
106        # Stop parsing options
107        shift
108        break
109     ;;
110    *) 
111        # Weird error
112        syserr "Hide! It's gonna blow!"
113        exit 2 
114    ;;
115    esac
116done
117
118# Source config file if one exists
119if [ -f $config ]
120then
121    sysout "Sourcing configuration file: $config"
122    . "$config"
123else
124    sysout "No configuration file present."
125fi
126
127# Apply the so-called custom settings
128if [ $custom_gain ]; then gain=$custom_gainfi
129if [ $custom_target ]; then target=$custom_targetfi
130if [ $custom_subdir ]; then subdir=$custom_subdirfi
131if [ $custom_quiet ]; then quiet=$custom_quietfi
132
133# Create full path
134fullpath="$target/$subdir"
135
136# If destination doesn't exist...
137if [ -e $fullpath ]
138then
139    # Ok, so there is something there...
140    if [ ! \( -d $fullpath \) ] 
141    then
142        # ...but that something is not a directory!
143        syserr "$fullpath is not a directory"
144        exit 4
145    fi
146    if [ ! \( -w $fullpath \) ]
147    then
148        # ...but we can't write there!
149        syserr "No write permission for $fullpath"
150        exit 8
151    fi
152else
153    # Create destination
154    mkdir -p $fullpath 2> /dev/null
155    if [ "$?" != 0 ]  
156    then
157        syserr "Can't create destination $fullpath"
158        exit 16
159    fi
160fi
161
162# Apply gain, you daft bugger.
163# Seriously, do I have to spell it out for you?
164function gain { 
165    # Resolve extension
166    ext=$(echo "$1" | awk -F "." '{print $NF}')
167
168    # Use the correct damn gain modification tool
169    if [ \( "$ext" == "ogg" \) -o \( "$ext" == "oga" \) ]
170    then
171        # Print short info
172        sysout "Setting gain to $gain for $(basename "$1") using vorbisgain"
173
174        # Run gain update for oggs
175        vorbisgain -q -g $gain "$1" 2> /dev/null
176    elif [ "$ext" == "mp3" ]
177    then
178        # Print short info
179        sysout "Setting gain to $gain for $(basename "$1") using mp3gain"
180
181        # Run gain update for mp3s
182        mp3gain -k -q -g $gain "$1" 2> /dev/null
183    else
184        syserr "Skiping gain modification for $(basename "$1")"
185    fi
186}
187
188# Process an unknown file type
189# (Direcotries are also a kind of file...)
190function resolve {
191    relative=$topdir${1:$cutoff}
192    #echo $cutoff $relative
193
194    if [ ! -d "$1" ] 
195    then
196        sysout "Copying $(basename "$1") to $(dirname "$fullpath/$relative")"
197
198        # Copy a file to destination
199        cp "$1" "$fullpath/$relative"
200
201        # Apply gain modification
202        if [ "$gain" != "" ]
203        then
204            gain "$fullpath/$relative"
205        fi
206    else
207        sysout "Creating directory $fullpath/$relative"
208
209        # Create a directory at destination
210        mkdir -p "$fullpath/$relative"
211
212        # Copy stuff
213        cp_dir "$1"
214
215        # TODO This could be optional...
216    fi
217}
218
219# Process a directory
220function cp_dir {
221    find "$1" | sort | while read f
222    do 
223        # Do NOT work on your own self, dumbass!
224        if [ "$f" == "$1" ]
225        then
226            continue
227        fi
228
229        # But work on everything else, accordingly
230        resolve "$f"
231    done
232}
233
234# Copy files from the sources to the destination directory
235if [ "$#" == 0 ] 
236then
237    # If no paths were given, use the current directory
238    cp_dir "."    
239else
240    for arg
241    do 
242        cutoff=${#arg}
243        topdir=$(basename "$arg")/
244
245        resolve "$arg"
246    done
247fi


The code is also available at GitHub as bash/.supplyrc and bash/supply.
Continue Reading...

lala moulati ana9a maghribia

seo

 

Blogroll

Site Info

Text

telechargementz Copyright © 2009 WoodMag is Designed by Ipietoon for Free Blogger Template