Posted: Mon 30 Jul 2012, 11:20 Post subject:
Recategorise and rename .desktop files to new dir
Hello,
I made this script to search for .desktop file categories - then based on the found categories to recategorise and rename the .desktop files to a new directory.
While it does work im wondering if there is some better, quicker more logical way to accomplish this task?
thanks.
# time ~/test
real 0m1.439s
user 0m0.190s
sys 0m0.323s
#
Code:
#!/bin/sh
## convert .desktop file categories and name ###########################
## SYSTEM ##############################################################
function SYSTEM () {
SEARCH="System|Monitor|Security|HardwareSettings|Core|X-SystemMemory|X-SystemSchedule"
MENUCAT="System"
CONVERT
}
SYSTEM
## BUISNESS ############################################################
function BUSINESS () {
SEARCH="Business|X-Calculate|Finance|Spreadsheet|ProjectManagement|Calculator|X-CalculateUtility"
MENUCAT="Business"
CONVERT
}
BUSINESS
## PERSONAL ############################################################
function PERSONAL () {
SEARCH="Personal|X-Personal|Calendar|ContactManagement|X-PersonalUtility"
MENUCAT="Personal"
CONVERT
}
PERSONAL
## INTERNET ############################################################
function INTERNET () {
SEARCH="Internet|X-Internet|WebBrowser|Email|News|InstantMessaging|Telephony|IRCClient|FileTransfer|P2P"
MENUCAT="Network"
#MENUCAT="Internet"
CONVERT
}
INTERNET
## FUN #################################################################
function GAME () {
SEARCH="Fun|Game|Amusement|ActionGame|AdventureGame|ArcadeGame|BlocksGame|BoardGame|CardGame|KidsGame|LogicGame|RolePlaying|Simulation|SportsGame|StrategyGame"
MENUCAT="Game"
CONVERT
}
GAME
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum