Execute scripts in your PWD without prepending them with "./"

To execute scripts in your PWD without prepending them with "./", add it to the end of your $PATH:
$ export PATH="$PATH:."
...and, to make it permanent, create an entry in your .bashrc:
$ echo "export PATH=\"\$PATH:.\"" >> ~/.bashrc
It won't cure cancer, I just think it's cool
(02/05/2009) Replaced the old title with one more descriptive.
Last edited by deltaecho (2009-02-06 03:47:41)

I put all my scripts-in-progress in ~/Workspace/Development/Scripts, and move them to /usr/local/bin when they become "production ready," but every now and then, I create a semi-random folder in which I create a script I only need temporarily; it's nice to be able to quickly create a script and run it with only its name, despite the fact prepending it with "./" only adds 2 more characters.
Arkane wrote:I'd say there still is a risk, because many applications will test for the presence of a helper application simply by trying to call it (for example with -v) and seeing if the command is found. Of course that's arguably bad practice on their part, but it's still pretty common in simpler scripts (I think).
@Arkane, could you give me some examples?

Similar Messages

  • How to delete photos on your phone without deleting them in your photo stream on Picasso

    How to delete photos on your phone without deleting them in your photo stream on Picasso

    Yes but if you have not done so, backup your iPhoto library. That way if there's a problem, you can restore from a backup.
    iPhoto '11: Back up your iPhoto library
    And there are alternatives to freeing up storage space >  iPhone or iPad's storage almost full? Tips on how to free up space

  • How do you delete photos from your iPad without deleting them from your Mac or iCloud?

    How do you delete photos from your iPad without deleting them from your Mac or iCloud?

    in iPad to Delete a photo or video: Tap trash icon. If you don’t see trash icon, tap the screen to display the controls.
    If they were added from your computer, you need to Sync and uncheck them and then sync again...
    Ipad User Guide  Page 61
    http://manuals.info.apple.com/en_US/ipad_2_user_guide.pdf

  • Is it possible to update a friend's iPhone on your computer without it interfering with your iTunes account?

    Is it possible to update a friend's iPhone on your computer without it interfering with your iTunes account?

    Read http://support.apple.com/kb/ht1495

  • Bash script: Rotate your wallpaper and SLiM theme at the same time

    EDIT;
    I've decided I should really thank Cerebral for his help with writing this script; this thank you should have been here from the get go.
    After writing:
    #!/usr/bin
    echo "Hello World!"
    I wrote a script to rotate my fluxbox background and SLiM theme at the same time, so I could have a contiuously changing background and still have a smooth transition from SLiM to fluxbox.  (It just looks so much cooler when both have matching backgrounds).  By the time you finish reading it, and configuring your box so it will work, you will probably have decided you could have writtin your own, better script to do the same thing.  But, on the off chance anybody finds use for it, here it is:
    (this should be obvious, but: don't run this script without at least reading the comments)
    #!/bin/bash
    #this is a script to rotate a number of backgrounds
    #to be shared by the fluxbox desktop and SLiM login manager.
    #it is the first meaningful script I've written. It may be
    #freely distributed and used with the understanding that you are
    #using it at your own risk.
    #Before running this script you need to check that your SLiM
    #themes are installed to the path /usr/share/slim/themes, which
    #is the defulat path for installation in Arch. Here are some
    #other things you need to set up:
    #1. create (if you don't have it) the directory /usr/share/wallpapers
    #2. create a wallpaper in /usr/share/wallpapers called 'dummy' by copying
    #you current wallpaper to that filename
    #3. set your window manager to display the wallpaper 'dummy', this works fine
    #using a style overlay in fluxbox, I haven't tested it with any other window
    #manager, but I don't see why this would cause a problem.
    #4. create a directory /usr/share/slim/themes/current, you can copy one of
    #your slim themes into that directory if you want. (this will prevent you
    #from seeing some error messages the first time you run the script)
    #5. define the names of the themes you want to rotate, in order for this
    #script to work, you must name them "themeNUMBER", where NUMBER is replaced
    #by an integer. Your themes must be numbered consecutively, start with 1
    # that is:
    #theme1 , theme2, theme3, etc. , theme305
    #If you don't number consecutively, this script will not run properly. You
    #must also define the total number of themes as "rotate_number"
    #6. Check if the script runs, if it does, you should change /etc/slim.conf to
    #use the theme "current"
    #7. This theme will now rotate your SLiM theme and wallpaper in such a way as
    #to make them match each other. Note that SLiM will not let you change themes
    #"on the fly", (as of July 6, 2008), so changes will not be apparent unless you
    #restart SLiM. I run the script before I run slim in my etc/rc.local local
    #script, so each time I reboot I get different wallpaper / login background.
    #Fred Drueck 2008
    #Define here all themes to be rotated and the total number of
    #themes to rotate:
    rotate_number=9
    theme1=/usr/share/slim/themes/default
    theme2=/usr/share/slim/themes/lake
    theme3=/usr/share/slim/themes/lunar
    theme4=/usr/share/slim/themes/flower2
    theme5=/usr/share/slim/themes/the-light
    theme6=/usr/share/slim/themes/mindlock
    theme7=/usr/share/slim/themes/parallel-dimensions
    theme8=/usr/share/slim/themes/wave
    theme9=/usr/share/slim/themes/fingerprint
    #check you are running this script as super-user:
    if [ $(id -u) != "0" ]; then
    echo "You must be the superuser to run this script" >&2
    exit 1
    fi
    echo "rotating themes"
    #figure out which theme is currently set, then name it as the variable
    #"last theme number", otherwise set last theme number as 0
    if [ -f /usr/share/slim/themes/current/current_theme_number ]
    then
    echo "checking current theme"
    cd /usr/share/slim/themes/current/
    eval last_theme_number=$(cat /usr/share/slim/themes/current/current_theme_number)
    echo $last_theme_number
    else
    echo "no theme is currently set, using theme 1"
    last_theme_number=0
    echo $1 > /usr/share/slim/themes/current/current_theme_number
    fi
    #set the new theme number
    eval new_theme_number=$(($(($last_theme_number % $rotate_number))+1))
    #select the new theme
    placeholder=theme
    eval new_theme=\$$placeholder$new_theme_number
    echo $new_theme
    #now clean out the "current" theme where I keep the current
    #theme for slim
    rm /usr/share/slim/themes/current/background*
    rm /usr/share/slim/themes/current/panel*
    rm /usr/share/slim/themes/current/slim.theme
    #the wildcards are there since the themes use jpg and png files
    cp $new_theme/background* /usr/share/slim/themes/current
    cp $new_theme/panel* /usr/share/slim/themes/current
    cp $new_theme/slim.theme /usr/share/slim/themes/current
    #increase the theme number, but first clear the old file
    rm /usr/share/slim/themes/current/current_theme_number
    echo $new_theme_number > /usr/share/slim/themes/current/current_theme_number
    #copy over the dummy wallpaper in "/usr/share/wallpapers" (with the theme
    #background file
    cp $new_theme/background* /usr/share/wallpapers/dummy
    exit 0
    Last edited by pseudonomous (2008-07-07 21:59:42)

    oh i forgot to mention... its rotating while moving. i.e. is doesn't have to stop rotate and then continue back to origin.

  • I want to sync my contacts without duplicating them with OS 10.6.8

    I have a problem. It seems that I cannot duplicate my contacts without duplicating them. What makes matters worse is that I am using OS 10.6.8, and the Icloud has never worked properly for me. I always wind up loosing the the ability to sync my calendar.
    At this time, I cannot up grade my OS with incurring the loss of programs I use everyday for my business due to incompatability issues.
    When ever I sync my contacts, they duplicate. I want to sync them, but I don't want to spend hours deleting the duplicates.
    Is there a way to do this?
    Thanks so much!!
    All best-
    Jane Huntington

    use Migration Assistant and everything would work.  But it didn't transfer any of my applications.
    Just to be clear - you said "Migration Assistant", but did you really use "Migration Assistant" or rather "Setup Assistant"? When setting up a new Mac, you will be prompted after installing the system to transfer your data - and that would be the Setup Assistant. if you first create your account, and then transfer, you will be using "Migration Assistant". The  "Setup Assistant" is greatly preferable, since it will keep the identity of the user account.
    But it didn't transfer any of my applications.
    The Setup Assistant or Migration Asistant lets you choose what to transfer. DId you enable to transfer your applications?
    Is your old mac a Power PC? If your applications are still PowerPC applications, they cannot run on a Mavericks system.  Try to update as many of your applications as possible to universal binary versions, that can run on Intel macs, before you migrate them to your new Mac.  Aperture 3.1.2 will not still not run on Mavericks, even if it is a univaersal binary, but if you get it transferred and installed on your new Mac, you can update it to 3.5.1.
    And before transferring your Aperture library, repair it using the First Aid Tools. See the Aperture Release Notes http://support.apple.com/kb/TS2518
    Scroll down to "A Note on Upgrading".

  • Is it possible to run a script through an action without adding them to a menu?

    Unlike with Photoshop, you can record an action to run a script from a path. With Illustrator, it seems that you can only insert menu item to run an "Other script", but it doesn't record the path, and isn't of much help. Yes, I can add this to the script menu, but I'm creating scripts for a group of people, and I didn't want to have to install anything on their local machines, other than an Action Set. Are there any alternatives?

    Nope, AI still won't remember paths to Scripts between restarts. Has been this way for at least 8 versions now so don't hold your breath for it to change.

  • Executing a report in background,without selection scr  with a variant

    Dear All,
    Please let me know whether I can execute a report which doesn't has a selection-screen, in background, <b>using a variant</b> ?
    Alok.

    Hi,
    In order to restrict the user to run it only in background , you can as well check for SY-BATCH condition.
    The other way is try to remove "execute in foreground" option from the menu and this can be done with the function module .
    Do reward points if useful and close the thread if the doubt is cleared
    data: begin of int_exc occurs 0,
    code like sy-ucomm,
    end of int_exc.
    data wf_repid .
    initialization.
    clear int_exc.
    int_exc-code = 'ONLI'.
    append int_exc.
    int_exc-code = 'PRIN'.
    append int_exc.
    move: sy-repid to wf_repid .
    call function 'RS_SET_SELSCREEN_STATUS'
    exporting
    p_status = '%_00'
    p_program = 'wf_repid'
    tables
    p_exclude = int_exc
    Regards,
    Ram
    Pls reward points if helpful....

  • Firebrand - a script to brand firefox without recompiling

    This is the initial thread for firebrand, a script for branding firefox without recompilation. Firebrand is a simple bash script, which replaces some text strings and the icons in an already installed instance of the firefox package.
    There are several versions/revisions of the script in this thread, but they can basically be divided into two "main" versions, or "branches" if you will. The earlier version needs to be updated for each new Firefox release. The later version is coded more generally, and should work for all Firefox versions.
    The latest general script is mekwall's revision of my latest version of the script, updated to use the proper icons. You can either use the PKGBUILD in the AUR (creds to Lucky) or just download the script in mekwall's post. If you do the latter, you need to make it executable before you run it, chmod +x firebrand, and then run ./firebrand. You need to be root for it to work properly.
    Lucky, who added the script to AUR, also started a git repository.
    To revert Firefox to the original branding, simply reinstall the firefox package.
    If the general version doesn't work (for instance, you still see the codename or the non-branded icon anywhere), try litemotiv's version. litemotiv's script is based on the earlier script, which needs to be updated for each new Firefox version. To make litemotiv's version work for other Firefox versions than 3.0, edit the FIREFOXDIR, FIREFOXSTRING and FIREFOXSTRINGPREFS variables in the script; the following example is for Firefox 3.5, codename "Shiretoko":
    FIREFOXDIR=/usr/lib/firefox-3.5
    FIREFOXSTRING="Shiretoko"
    FIREFOXSTRINGPREFS="Shiretoko"
    According to hit, firebrand is available in archlinux.fr's repository, but the repos contains the earlier script, i.e. the version which has to be updated for each new Firefox version.
    ---------------- History note ----------------
    This thread was started on 2008-02-21, as I had some questions on the proper way to put firebrand on the AUR, which is why this thread is in this not-so-suitable subforum. The subsequent discussion made me rewrite the script somewhat and post it as a stand-alone script. The initial wording of this post is a little redundant now, but is kept below for the integrity of this thread.
    The version below in this post is not the latest version; see above.
    ---------------- Initial thread start below ----------------
    Hi,
    Prompted by this discussion I decided to make available (on the AUR) my small script that brands firefox without recompilation. With some sed:ing and copying it simply replaces the "Bon Echo" string from some files and replaces the Bon Echo icons with the official one(s) in an existing installation of firefox*. Afterwards it is just to restart firefox (and perhaps the DE to replace the firefox icon) and rejoice
    * Yes, replaces. To go back to the original Bon Echo "brand", simply reinstall firefox.
    I have two questions, though:
    1. Would the script end up in some legal grey-zone? The PKGBUILD does not itself contain any icons, but downloads them from a publicly available source repository for firefox. I myself at least think that no one here would object, since we already have the firefox-branded PKGBUILD in the AUR. ...or firefox-branded gets new company in the ...zone
    2. Since this is just a script I have made for my own personal... peace of mind, I have no URL to supply for the package. Does this matter?
    Below are both the PKGBUILD and the firebrand script if anyone is interested:
    EDIT: Added depends...
    pkgname=firebrand
    pkgver=20080221
    pkgrel=1
    pkgdesc="A script to brand firefox without recompiling."
    arch=('i686' 'x86_64')
    license=('GPL')
    depends=('zip' 'unzip' 'imagemagick')
    source=('firebrand.sh'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/mozicon50.xpm?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/mozicon16.xpm?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/mozicon128.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/document.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/content/icon48.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/content/icon64.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/content/about.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/content/aboutCredits.png?raw=1'
    'http://lxr.mozilla.org/seamonkey/source/other-licenses/branding/firefox/content/aboutFooter.png?raw=1')
    md5sums=('2e9481ba02dfc3dc1f0fd02e07ccde98'
    '68fb3d9d3a91f3e99947b15c3cb03429'
    'd8b1c9e81222dd7df6d3c59ba205723d'
    'ff03ef6903c8f067dc5459c901b0b5a8'
    'b2a2dc01f2693d3e0eb47c7314783566'
    'da566d6e494d547e7ef4eba183e49603'
    '04a0735c7e33b0831975dca3d1c3e078'
    'ed27277ed6cc3fa83a256188b5699541'
    'd45dbd72b71abdd3d3f3e870ea90a03f'
    '8b1a1daff0845fca259575ca65046a1b')
    build() {
    mkdir -p "$pkgdir/usr/bin"
    mkdir -p "$pkgdir/usr/share/firebrand"
    install -m755 "$srcdir/firebrand.sh" "$pkgdir/usr/bin/firebrand"
    install -m644 "$srcdir/mozicon50.xpm?raw=1" "$pkgdir/usr/share/firebrand/default.xpm"
    install -m644 "$srcdir/mozicon50.xpm?raw=1" "$pkgdir/usr/share/firebrand/mozicon50.xpm"
    install -m644 "$srcdir/mozicon16.xpm?raw=1" "$pkgdir/usr/share/firebrand/mozicon16.xpm"
    install -m644 "$srcdir/mozicon128.png?raw=1" "$pkgdir/usr/share/firebrand/mozicon128.png"
    install -m644 "$srcdir/document.png?raw=1" "$pkgdir/usr/share/firebrand/document.png"
    install -m644 "$srcdir/icon48.png?raw=1" "$pkgdir/usr/share/firebrand/icon48.png"
    install -m644 "$srcdir/icon64.png?raw=1" "$pkgdir/usr/share/firebrand/icon64.png"
    install -m644 "$srcdir/about.png?raw=1" "$pkgdir/usr/share/firebrand/about.png"
    install -m644 "$srcdir/aboutCredits.png?raw=1" "$pkgdir/usr/share/firebrand/aboutCredits.png"
    install -m644 "$srcdir/aboutFooter.png?raw=1" "$pkgdir/usr/share/firebrand/aboutFooter.png"
    # vim:set ts=2 sw=2 et:
    #!/bin/sh
    FIREFOXDIR=/usr/lib/firefox
    CHROMEDIR=$FIREFOXDIR/chrome
    NEWICONSDIR=/usr/share/firebrand
    die () {
    EXITCODE="${1:-9}"
    MESSAGE="$2"
    echo -e "\n$MESSAGE"
    exit $EXITCODE
    TEMPDIR=$(mktemp -d -t firebrand-XXXXXXXX)
    if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary directory."
    fi
    echo -e "\033[1mRE-BRANDING chrome/en-US.jar\033[0m"
    echo -n " - Unzipping en-US.jar to ${TEMPDIR}... "
    unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Could not unzip branding files."
    for FILE in $TEMPDIR/locale/branding/* ; do
    sed -i 's|Bon Echo|Firefox|g' "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
    done
    echo " - Replacing branding files in en-US.jar"
    ( cd $TEMPDIR && zip -q -r "$CHROMEDIR/en-US.jar" locale/branding/* )
    echo -e "\033[1mRE-BRANDING chrome/browser.jar\033[0m"
    echo " - Replacing branded icons in browser.jar"
    mkdir -p "$TEMPDIR/content/branding"
    cp "$NEWICONSDIR"/{about.png,aboutCredits.png,aboutFooter.png,icon48.png,icon64.png} "$TEMPDIR/content/branding/"
    ( cd $TEMPDIR && zip -q -r "$CHROMEDIR/browser.jar" content/branding/* )
    echo -e "\033[1mRE-BRANDING defaults/pref/firefox.js\033[0m"
    sed -i 's|BonEcho|Firefox|g' $FIREFOXDIR/defaults/pref/firefox.js && echo " - Successfully edited $FIREFOXDIR/defaults/pref/firefox.js." || die 1 "Could not edit $FIREFOXDIR/defaults/pref/firefox.js."
    echo -e "\033[1mReplacing icons...\033[0m"
    cp "$NEWICONSDIR/default.xpm" $FIREFOXDIR/chrome/icons/default/
    cp "$NEWICONSDIR"/{default.xpm,document.png,mozicon128.png,mozicon16.xpm,mozicon50.xpm} $FIREFOXDIR/icons/
    chmod 644 $FIREFOXDIR/chrome/icons/default/default.xpm $FIREFOXDIR/icons/*
    chown root:root $FIREFOXDIR/chrome/icons/default/default.xpm $FIREFOXDIR/icons/*
    convert "$NEWICONSDIR/default.xpm" /usr/share/pixmaps/firefox.png
    chmod 644 /usr/share/pixmaps/firefox.png
    chown root:root /usr/share/pixmaps/firefox.png
    Last edited by Bebo (2010-02-15 21:16:21)

    I made some changes that make conforming to new firefox versions easier. Simply change FIREFOXDIR to point to the new dir and FIREFOXSTRING with the new codename. This one is already set up for Gran Paradiso (firefox-3.0.1).
    edit: FIREFOXSTRINGPREFS is the codename as it appears in the preferences, usually without spaces.  (may be the same as FIREFOXSTRING, as with Minefield)
    #!/bin/sh
    # firebrand - a script to brand firefox without recompilation
    # This script replaces and changes (a few) files in an existing firefox
    # installation. Run it after a firefox installation or upgrade, and restart
    # firefox. The program icon may not be (visibly) replaced until your desktop
    # environment is restarted.
    # To revert to the original brand, simply reinstall firefox.
    # Dependencies: curl, zip, unzip, imagemagick
    #FIREFOXDIR: Where firefox's data files resides.
    # Bon Echo:
    #FIREFOXDIR=/usr/lib/firefox
    #FIREFOXSTRING="Bon Echo"
    #FIREFOXSTRINGPREFS="BonEcho"
    # Minefield:
    #FIREFOXDIR=/usr/lib/firefox-3.0
    #FIREFOXSTRING="Minefield"
    #FIREFOXSTRINGPREFS="Minefield"
    # Gran Paradiso:
    FIREFOXDIR=/usr/lib/firefox-3.0.1
    FIREFOXSTRING="Gran Paradiso"
    FIREFOXSTRINGPREFS="GranParadiso"
    NEWICONSDIR="" # If empty, the script uses a temporary directory for the replacement icons.
    # If you want to avoid downloading the icons every time you rebrand firefox,
    # point NEWICONSDIR to a suitable directory.
    SOURCEBASE="http://lxr.mozilla.org/seamonkey/source" # The URL under which the "other-licenses" directory resides.
    CHROMEDIR=$FIREFOXDIR/chrome # Simply the firefox chrome directory.
    die() {
    EXITCODE="${1:-9}"
    MESSAGE="$2"
    echo -e "\n$MESSAGE"
    exit $EXITCODE
    get_icon() {
    local ICON="$1"
    local SOURCEFILE="$2"
    echo -n " - $ICON"
    if [ -e "$NEWICONSDIR/$ICON" ] ; then
    if [ -f "$NEWICONSDIR/$ICON" ] ; then
    echo " is present."
    return 0
    else
    echo " is present but is not a file. Quitting."
    exit 1
    fi
    fi
    echo -n ": Downloading... "
    if curl -sS "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
    echo "Done."
    return 0
    else
    exit 1
    fi
    TEMPDIR=$(mktemp -d -t firebrand-work-XXXXXXXX)
    if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary work directory."
    fi
    if [ "x$NEWICONSDIR" == "x" ] ; then
    NEWICONSDIR=$(mktemp -d -t firebrand-icon-XXXXXXXX)
    if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary icon directory."
    fi
    else
    [ -e "$NEWICONSDIR" ] || mkdir -p "$NEWICONSDIR" || die 1 "Could not create icon directory $NEWICONSDIR."
    fi
    echo -e "\033[1mChecking replacement icons\033[0m"
    get_icon "mozicon50.xpm" "/other-licenses/branding/firefox/mozicon50.xpm?raw=1"
    get_icon "mozicon16.xpm" "/other-licenses/branding/firefox/mozicon16.xpm?raw=1"
    get_icon "mozicon128.png" "/other-licenses/branding/firefox/mozicon128.png?raw=1"
    get_icon "document.png" "/other-licenses/branding/firefox/document.png?raw=1"
    get_icon "icon48.png" "/other-licenses/branding/firefox/content/icon48.png?raw=1"
    get_icon "icon64.png" "/other-licenses/branding/firefox/content/icon64.png?raw=1"
    get_icon "about.png" "/other-licenses/branding/firefox/content/about.png?raw=1"
    get_icon "aboutCredits.png" "/other-licenses/branding/firefox/content/aboutCredits.png?raw=1"
    get_icon "aboutFooter.png" "/other-licenses/branding/firefox/content/aboutFooter.png?raw=1"
    cp "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default.xpm"
    convert -resize 48x48 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default48.png"
    convert -resize 32x32 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default32.png"
    convert -resize 16x16 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default16.png"
    echo -e "\033[1mBranding chrome/en-US.jar\033[0m"
    echo -n " - Unzipping branding files in chrome/en-US.jar to temporary directory... "
    unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Failed."
    for FILE in $TEMPDIR/locale/branding/* ; do
    sed -i "s|$FIREFOXSTRING|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
    done
    echo -n " - Replacing old branding files in chrome/en-US.jar... "
    ( cd $TEMPDIR && zip -q -r "$CHROMEDIR/en-US.jar" locale/branding/* ) && echo "Done." || die 1 "Failed."
    echo -e "\033[1mBranding chrome/browser.jar\033[0m"
    echo -n " - Making new branding icon structure in temporary directory... "
    mkdir -p "$TEMPDIR/content/branding" || die 1 "Could not create $TEMPDIR/content/branding."
    cp "$NEWICONSDIR"/{about.png,aboutCredits.png,aboutFooter.png,icon48.png,icon64.png} "$TEMPDIR/content/branding/" || die 1 "Could not copy new icons to $TEMPDIR/content/branding/."
    echo "Done."
    echo -n " - Replacing old branding icon structure in chrome/browser.jar... "
    ( cd $TEMPDIR && zip -q -r "$CHROMEDIR/browser.jar" content/branding/* ) && echo "Done." || die 1 "Failed."
    echo -e "\033[1mBranding defaults/preferences/firefox.js\033[0m"
    sed -i "s|$FIREFOXSTRINGPREFS|Firefox|g" $FIREFOXDIR/defaults/preferences/firefox.js && echo " - Successfully edited $FIREFOXDIR/defaults/preferences/firefox.js." || die 1 "Could not edit $FIREFOXDIR/defaults/preferences/firefox.js."
    echo -e "\033[1mBranding icons\033[0m"
    echo -n " - Replacing icons in chrome/icons/default/... "
    cp "$NEWICONSDIR"/{default48.png,default32.png,default16.png} $FIREFOXDIR/chrome/icons/default/ && echo "Done." || die 1 "Failed."
    echo -n " - Replacing icons in icons/... "
    cp "$NEWICONSDIR"/{document.png,mozicon128.png,mozicon16.xpm,mozicon50.xpm} $FIREFOXDIR/icons/ && echo "Done." || die 1 "Failed."
    chmod 644 $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*
    chown root:root $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*
    echo -n " - Replacing /usr/share/pixmaps/firefox.png: "
    convert "$NEWICONSDIR/default.xpm" /usr/share/pixmaps/firefox.png && echo "Done." || die 1 "Failed."
    chmod 644 /usr/share/pixmaps/firefox.png
    chown root:root /usr/share/pixmaps/firefox.png
    Last edited by coutinho (2008-07-20 20:32:23)

  • How do you restore your iPhone without deleting all your apps?

    Ok so I'm trying to remove Cydia from my iPhone 4, and I wanted to make sure it's fully removed. I managed to delete the app straight from my iPhone by force deleting the Cydia Installer package, and the icon is totally gone my iPhone. I deleted it because the jailbreak is eating up my battery. However, I don't think the jailbreak is completely removed.
    Question: How do you restore your iPhone from iTunes without deleting all your apps and everything from your iPhone? Like when I click restore it says it will delete it and you will have to repurchase your apps. I have tons of apps and I don't want to spend my money for the same thing twice! I want to know how (step-by-step) to back up and restore your iPhone without it messing with any of the photos, apps, etc.
    Also, will updating your firmware to 4.1 wipe out the jailbreak?
    Thanks a ton.

    How do I know if it's on my computer?
    If you bought the apps via iTunes, they will be on your computer. If you bought them with the iPhone, syncing would have transferred them. Look for them in:
    ~/Music/iTunes/iTunes Music/Mobile Applications
    Photos taken with the iPhone are transferred via iPhoto or Image Capture when the phone is connected to the computer. Other photos on the phone must have been synched from the computer, so should still be there.

  • How to execute web applications without deploying them?

    How can I execute web applications without deploying them (without mentioning them in the server.xml)?
    I have an IWS 6.1 SP1 installed with default parameters (JES). I would like that a posix user could execute his own web application without administrator collaboration.
    Does it exist some sort of "autodeploy" like in tomcat?
    (I know about the invoker mapping in default-web.xml, just I don't realy understand what does it eventuate. I tried to unzip webapps-simple.war in the directory $IWS_SERVER_HOME/webapps/$instance_name/servlet/tmp/
    but the http://a.a.tg/servlet/tmp request failed:
    javax.servlet.ServletException: WEB2784: Wrapper cannot find servlet class tmp or a class it depends on
    ----- Root Cause -----
    java.lang.ClassNotFoundException: tmp
    How can I solve this? Users should have write permission to the directories in the classpath to put their servlet.class files into? Bad idea...
    (I tried to "execute" the $IWS_SERVER_HOME/plugins/java/samples/webapps/simple/webapps-simple.war)
    (Sorry for my language skills)

    Do as many of the rest of us do, until this behavior is changed (if ever). Eport your WEb gallery to your Hd and use an FTP client, there are so many, including Drreamweaver's, and Shareware ones, and upload just the relevant files/folders. Some can even check and do this for you.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Is it possible to combine multiple pdf's into one without saving them onto your computer?

    Hello
    I open pdf's in an application (no add ons for acrobat exist), and want to combine them without having to use time on saving them before merging them into one single document.
    Is it possible to do this without having the files saved onto your computer? I use acrobat x pro.

    I dont think you understand my question. Of course Adobe reader cant combine pdf's, if it could I would not have had to purchase Adobe acrobat.
    The problem I am trying to solve is how to combine pdf files when they are not opened/saved locally on my computer.
    If I make Acrobat the standard program for opening pdf files on my computer - then will it be possible to combine the files that are opened without saving them first?
    I dont have the program installed on my computer now, and have to know this before we purchase it.

  • An error occcurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script"

    We've been getting the following error for some time now.
    An error occurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script'
    Source: Microsoft VBScript runtime error
    Description: The remote server machine does not exist or is unavailable: 'GetObject'
    One or more workflows were affected by this.
    Workflow name: System.Mom.BackwardCompatibility.ServiceStateMonitoring
    Instance name: server.domain.local
    Instance ID: {INSTANCE}
    Management group: GROUP
    Unfortunately the instance in question has since been decommissioned and simply does not exist any more. 
    We're currently on a repeat count of over 350,000 and I would REALLY like to get it stopped. I've had a look at adding an override but that points to the management server rather than the instance itself.
    Does anyone have any suggestions?
    thanks in advance!

    Hi Steven,
    There are for option for us to override a monitor ot rule:
    For all objects of class:             
    Class            
    When you select this option for your override, the override settings apply to all objects in the class at which the rule or monitor is targeted.
    For a group            
    When you select this option for your override, the override settings apply only to members of the group. The rule or monitor without the override settings continues to apply to all objects in the targeted class except for those objects that are also members
    of the group used for the override.
    When you create a group, you save it to an unsealed management pack. However, an element in an unsealed management pack, such as an override, cannot reference an element in a different unsealed management pack, such as a group. If you are going to use a group
    to limit the application of an override, you must either save the group to the same unsealed management pack as the override, or you must seal the management pack that contains the group.
    For a specific object of class:             
    Class            
    When you select this option for your override, the override settings apply only to the specified object. The rule or monitor without the override settings continues to apply to all other objects in the targeted class.
    For all objects of another class            
    When you select this option for your override, the override settings apply only to objects of a class other than the targeted class. The rule or monitor without the override settings continues to apply to all objects in the targeted class.
    Did you try to override it for a specific object of class?
    Regards,
    Yan Li
    Regards, Yan Li

  • Execute Script - How to Update second node in XML group

    Hi,
    I have an XML variable "myXML" which is set to:
    <root>
         <nodes>
              <node>
                   <value>a</value>
              </node>
              <node>
                   <value>b</value>
              </node>
         </nodes>
    </root>
    Question - within an Execute script, how can I easily access and update the second node value? i.e. change "b" to "c"
    The following fails in Execute Script (although it is possible using an XPath expression in a SetValue
      patExecContext.setProcessDataValue("/process_data/myXML/root/nodes/node[1]/value", "c");
    If I have square brackets in this expression then it fails with a nasty error
    Is there an easy way?

    I tired your script in my sandbox and its working fine without fail.
    I noticed an additional space in your xpath expression
      patExecContext.setProcessDataValue("/process_data/myXML/root/nodes/no de[1]/value", "c");
    Can you remove the space within node tag and try again?
    Nith

  • Call a host script from concurrent program without exposing APPS password?

    My understanding is as of now I need to link $FND_TOP/bin/fndcpesr in order to launch a unix script as concurrent program. This implies that there will be 4 standard input parameters when a certain unix script is called including oracle schema and password. As I see it now APPS password is provided to such scripts.
    Is there a way to execute a unix script from under 11i without exposing APPS password?

    Many thanks.
    Protecting Your Oracle User Password
    In some cases, there are security concerns with passing your Oracle username and
    password directly to your HOST program. If you do not want the concurrent manager
    to pass your username/password to your program, you can have the manager pass it as
    an environment variable instead. Or you can pass an Oracle Applications
    username/password for a user with the System Administrator responsibility.
    Alternatively, you can not pass it at all.
    First, define your concurrent program executable as a HOST program in the Concurrent
    Program Executable form.
    To have the username/password passed as an environment variable, enter the term
    'ENCRYPT' in the Execution Options field of the Concurrent Programs window when
    defining a concurrent program using this executable. 'ENCRYPT' signals the concurrent
    manager to pass the username/password in the environment variable fcp_login. The
    argument $1 is left blank.
    If you do not want the username/password passed to the program at all, enter
    +'SECURE' in the Execution Options field. The concurrent manager will not pass the+
    username/password to the program.

Maybe you are looking for

  • Cm1312nfi mfp on 32bit windows 7 - upgraded with full solution sw and can't scan from printer

    I have had a cm1312nfi mrp since 2009 that works fine but my HP Solution centre stopped giving me ink levels. I uninstalled the printer software and downloded the current full solution sw for 32 bit windows 7 from HP. The printer works but I did not

  • Firewire to transfer data

    I have a 30 pin FireWire from an older iPod, will it work to charge my iPhone and transfer data? Or will "fry" my iPhone, anyone?

  • No sound with Blu-Ray

    I have a e9150t with a blu-ray dvd player. I can't get any sound with my external speakers. The only way I seem to be able to get sound is with blue tooth headphones. I tried disabling all but the external and making them the default but they still d

  • Using XDB for manipulating table BLOBS?

    Hi! I have got a database table with a BLOB column which contains MS Office documents. For editing the documents I have written a small application for downloading the document, edit it with Office and upload it again to the database. Can I use XDB f

  • Getting hold of the servlet context within a filter

    How can I get hold of the servlet context from within a filter?