summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_info.sh
blob: 41a4c630340cb1eb58a3d6cbe05377167467efbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Copyright 2015 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2

set -e

ARCH=$(dpkg --print-architecture)
NUM_CPU=$(grep -c '^processor' /proc/cpuinfo)
CPU_MODEL=$(cat /proc/cpuinfo |grep "model name"|head -1|cut -d ":" -f2|xargs echo)
DATETIME=$(date +'%Y-%m-%d %H:%M %Z')

for i in ARCH NUM_CPU CPU_MODEL DATETIME ; do
	if [ "$1" = "$i" ] ; then
		echo "${!i}"
	fi
done