Codebase list ido-ubiquitous / upstream/3.16 setversion.sh
upstream/3.16

Tree @upstream/3.16 (Download .tar.gz)

setversion.sh @upstream/3.16raw · history · blame

#!/bin/bash

TARGET_VERSION="$1"
if [ -n "$TARGET_VERSION" ]; then
    echo "Updating version to $TARGET_VERSION";
    perl -i'orig_*' -lape "s/Version: [0-9.]+/Version: $TARGET_VERSION/g;" \
         -e "s/((?:defconst|defvar|setq).*-version\s+)\"[0-9.]+\"/\${1}\"$TARGET_VERSION\"/g;" \
         -e "s/(Package-Requires.*\(ido-completing-read\+\s+)\"[0-9.]+\"\)/\${1}\"${TARGET_VERSION}\")/g;" \
         *.el
else
    echo "Usage: $0 VERSION_NUMBER"
fi