improve install.sh part 2
This commit is contained in:
parent
ea34c8aca6
commit
6b1da451c8
14
install.sh
14
install.sh
@ -28,13 +28,13 @@ download_bf() {
|
||||
message "[>>] Existing user.js detected! Creating backup to user-prefs-backup/..."
|
||||
user_pref_backup_dir="${CHROME_DIRECTORY}/../user-prefs-backup"
|
||||
|
||||
if [[ ! -d "$user_pref_backup_dir" ]];
|
||||
if [[ ! -d "${user_pref_backup_dir}" ]];
|
||||
then
|
||||
message "[>>] user-prefs-backup/ folder does not exist! Creating..."
|
||||
mkdir "${CHROME_DIRECTORY}/../user-prefs-backup"
|
||||
mkdir "${user_pref_backup_dir}"
|
||||
fi
|
||||
|
||||
mv --backup=t "${CHROME_DIRECTORY}/../user.js" "${CHROME_DIRECTORY}/../user-prefs-backup/"
|
||||
mv --backup=t "${CHROME_DIRECTORY}/../user.js" "${user_pref_backup_dir}"
|
||||
fi
|
||||
|
||||
# Move user.js to the main profile directory
|
||||
@ -135,17 +135,17 @@ then
|
||||
# If there's a current theme, make a backup
|
||||
if [ ${#content[@]} -gt 0 ];
|
||||
then
|
||||
message "[>>] Existing chrome folder detected! Creating a backup..."
|
||||
|
||||
message "[>>] Existing chrome folder detected! Creating a backup to chrome-backup/..."
|
||||
backup_dir="${CHROME_DIRECTORY}-backup"
|
||||
|
||||
# Create backup folder
|
||||
if [[ ! -d "${backup_dir}" ]];
|
||||
then
|
||||
message "[>>] chrome-backup/ folder does not exist! Creating..."
|
||||
mkdir "${backup_dir}"
|
||||
fi
|
||||
|
||||
mv --backup=t "${CHROME_DIRECTORY}" "${CHROME_DIRECTORY}-backup"
|
||||
mv --backup=t "${CHROME_DIRECTORY}" "${backup_dir}"
|
||||
mkdir "${CHROME_DIRECTORY}"
|
||||
fi
|
||||
# Download theme
|
||||
@ -162,7 +162,7 @@ then
|
||||
# Download theme
|
||||
download_bf
|
||||
else
|
||||
message "[!!] There was a problem creating the directory. Terminating..."
|
||||
message "[!!] There was a problem while creating the directory. Terminating..."
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user