Add timestamps to .config backup names (e.g. .config--2011-01-13--15-01-53.bak) so...
authorSebastian Pipping <sebastian@pipping.org>
Thu, 13 Jan 2011 14:06:54 +0000 (15:06 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 13 Jan 2011 14:06:54 +0000 (15:06 +0100)
gen_configkernel.sh

index ee76ec1c18886cd441b9194fd81e046a58fc537d..b56228768ed0ed9c2eec5419c0fb7dc6f273205a 100755 (executable)
@@ -35,9 +35,10 @@ config_kernel() {
                print_info 1 "config: Using config from ${KERNEL_CONFIG}"
                if [ -f "${KERNEL_DIR}/.config" ]
                then
-                       cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" \
+                       NOW=`date +--%Y-%m-%d--%H-%M-%S`
+                       cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config${NOW}.bak" \
                                        || gen_die "Could not backup kernel config (${KERNEL_DIR}/.config)"
-                       print_info 1 '        Previous config backed up to .config.bak'
+                       print_info 1 "        Previous config backed up to .config${NOW}.bak"
                fi
                cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die 'Could not copy configuration file!'
        fi