-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompatibility.sh
More file actions
35 lines (27 loc) · 862 Bytes
/
Copy pathcompatibility.sh
File metadata and controls
35 lines (27 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
config="$HOME/.config"
gpt="$HOME/.efigpt
if [ ! -d "$config" ]; then
echo "Creating ~/.config directory..."
mkdir -p "$config"
fi
if [ ! -d "$gpt" ]; then
mkdir -p "$gpt"
fi
if ! command -v crew >/dev/null 2>&1; then
echo "Installing Chromebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/skycocker/chromebrew/master/install.sh)"
fi
if ! command -v uuidgen >/dev/null 2>&1; then
echo "Installing uuidgen"
crew install util-linux
fi
uuid=$(uuidgen)
uuid_gpt=$(uuidgen)
# Write device info to ~/.config/device_info
echo "os=cros_flex" > "$config/device_info"
echo "device=chromebook_2a" >> "$config/device_info"
echo "$uuid" > "$config/deviceuuid"
echo "guid=$uuid_gpt" > "$gpt/config"
echo "name=CrOS_partition" >> "$gpt/config"
echo "security=writeprotection(putils.math.half)" >> "$gpt/config"