Ignore:
Timestamp:
Feb 23, 2017, 12:19:45 AM (5 years ago)
Author:
andersk
Message:
rpm-master.sh, rpmlist.sh: Improve shell hygiene
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/locker/sbin/rpmlist.sh

    r2274 r2823  
    11#!/bin/sh
     2set -eu
    23
    34export LC_ALL=C
    45
    56copyTo='/mit/scripts/cron_scripts/rpm-sync/'
    6 packages=`mktemp --tmpdir rpmlist.XXXXXX`
    7 rpm -qa --queryformat '%{NAME}.%{ARCH}\n' | sort | uniq > $packages
     7packages=$(mktemp --tmpdir rpmlist.XXXXXX)
     8rpm -qa --queryformat '%{NAME}.%{ARCH}\n' | sort | uniq > "$packages"
    89
    9 host=`hostname`
     10host=$(hostname)
    1011extension='.rpmlist'
    1112file="$copyTo/$host$extension"
    12 mv $packages $file
     13mv "$packages" "$file"
Note: See TracChangeset for help on using the changeset viewer.