mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-29 17:25:34 +00:00
17 lines
329 B
Bash
17 lines
329 B
Bash
#! /bin/bash
|
|
|
|
# source backup sudo
|
|
files=(~/.zshrc ~/.config/.dotfiles/.zshrc 'n')
|
|
|
|
for (( i=0; i<${#files[@]} ; i+=3 )) ; do
|
|
if [[ $* == *-b* ]]; then
|
|
cp ${files[i]} ${files[i+1]}
|
|
else
|
|
if [[ ${files[i+2]} == *'y'* ]]; then
|
|
sudo cp ${files[i+1]} ${files[i]}
|
|
else
|
|
cp ${files[i+1]} ${files[i]}
|
|
fi
|
|
fi
|
|
done
|