1 Star 0 Fork 2

高标 / Deepin-File-Manager

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
dde-xdg-user-dirs-update.sh 811 Bytes
Copy Edit Raw Blame History
ding465398889 authored 2016-09-01 16:52 . Hide template and public
#!/bin/bash
DIRS=(DESKTOP DOWNLOAD TEMPLATES PUBLICSHARE DOCUMENTS PICTURES MUSIC VIDEOS)
dirnames=(Desktop Downloads Templates Public Documents Pictures Music videos)
i=0
for item in "${DIRS[@]}"; do
dir=$(xdg-user-dir $item)
# echo $item
# echo ~/${dirnames[i]}
if [[ $dir == $HOME/ ]]; then
xdg-user-dirs-update --set $item ~/${dirnames[i]}
mkdir -p ~/${dirnames[i]}
fi
if [[ "$item" = "TEMPLATES" ]]; then
# echo $dir, $HOME/.${dirnames[i]}
mv $dir $HOME/.${dirnames[i]}
xdg-user-dirs-update --set $item ~/.${dirnames[i]}
fi
if [[ "$item" = "PUBLICSHARE" ]]; then
# echo $dir, $HOME/.${dirnames[i]}
mv $dir $HOME/.${dirnames[i]}
xdg-user-dirs-update --set $item ~/.${dirnames[i]}
fi
i=$i+1
done
1
https://gitee.com/agaobiao/Deepin-File-Manager.git
git@gitee.com:agaobiao/Deepin-File-Manager.git
agaobiao
Deepin-File-Manager
Deepin-File-Manager
master

Search